Applying Bayesian inference to Global Terrorism Database in order to ~predict~ terrorism
The Global Terrorism Database (GTD) is an open-source database including information on terrorist attacks around the world from 1970 through 2015 (with annual updates planned for the future). The GTD includes systematic data on domestic as well as international terrorist incidents that have occurred during this time period and now includes more than 150,000 cases. The database is maintained by researchers at the National Consortium for the Study of Terrorism and Responses to Terrorism (START), headquartered at the University of Maryland.
Geography: Worldwide
Time period: 1970-2015, except 1993 (2016 in progress, publication expected June 2017)
Unit of analysis: Attack Variables: >100 variables on location, tactics, perpetrators, targets, and outcomes
Sources: Unclassified media articles (Note: Please interpret changes over time with caution. Global patterns are driven by diverse trends in particular regions, and data collection is influenced by fluctuations in access to media coverage over both time and place.)
"The threatened or actual use of illegal force and violence by a non-state actor to attain a political, economic, religious, or social goal through fear, coercion, or intimidation."
(1) EDA
(2) Bayesian inference -- look at difference in incidences of terrorism across globe
(3) Impute number of bombings/explosions that occured in 1993
(4) Description of methods
focusing on attacktype1 -- distribution across world, frequency, etc
VIZ
REQUIRED TO PRODUCE AT LEAST ONE VIZ INDEXED BY TIME
Prior: amount of terror a given area has seen
Update prior with new information (e.g. new year of attacks, additional country within region)
Compare two populations using Bayesian inference.
Does amount of terror one area has seen differ significantly than that of another area (or time period)?
[For example, if you are interested in knowing if one country in South America differs in a significant way from another area, you may make your prior assume that some country is a country in South America with μ average attacks and σ variation across South American countries. You would then update that prior with the information of a single country in South America as well as a separate country in South America. How significantly do the resulting posteriors differ? (An important assumption made here is that the time periods are being held constant, perhaps a single year.)]
use credible intervals
follows pymc walkthrough
focus on attacktype1 bombings (category 3)
how to best fill in missing values?
are hemispheres separate models? (come up with better way)
apply methodology to other attack categories
turn methodology into pipeline
Two-page (four pages double-spaced) report discussing methodology and findings. VIZ as appendices. Include (1) Bayesian test and (2) imputed valuesfor 1993 attacks. Defend prior of Bayesian inference. Justify model used to impute values for 1993.
##importing necessary libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
from __future__ import division
import numpy as np
from datetime import datetime
from datetime import timedelta
import pysal
import geopandas as gpd
from ipywidgets import interact, HTML, FloatSlider
from IPython.display import clear_output, display
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
from statsmodels.tsa.stattools import acf, pacf
from statsmodels.tsa.arima_model import ARMA, AR
from statsmodels.tsa.seasonal import seasonal_decompose
from statsmodels.tsa.stattools import adfuller
from statsmodels.tsa.arima_model import ARIMA
%config InlineBackend.figure_format = 'retina'
import pymc3 as pm
Couldn't import dot_parser, loading of dot files will not be possible.
data = pd.read_csv("../../../For_DSI/GTD_Project/GTD.csv") ##reading in the csv file from the GTD
/Applications/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py:2717: DtypeWarning: Columns (4,61,62,66,116,117,123) have mixed types. Specify dtype option on import or set low_memory=False. interactivity=interactivity, compiler=compiler, result=result)
##changing display parameters
pd.set_option('display.max_rows', 20)
pd.set_option('display.max_columns', 20)
#pd.set_option('display.max_colwidth', 800)
def EDA(dataframe): ##function for basic exploratory data analysis purposes
print "missing values \n", dataframe.isnull().sum(), "\n"
print "dataframe types \n", dataframe.dtypes, "\n"
print "dataframe shape \n", dataframe.shape, "\n"
print "dataframe describe \n", dataframe.describe(), "\n"
print "dataframe duplicate rows \n", dataframe.duplicated().sum(), "\n"
for item in dataframe:
print item
print dataframe[item].nunique()
EDA(data)
missing values
eventid 0
iyear 0
imonth 0
iday 0
approxdate 152016
extended 0
resolution 153270
country 0
country_txt 0
region 0
region_txt 0
provstate 14520
city 446
latitude 4519
longitude 4519
specificity 0
vicinity 0
location 114561
summary 66140
crit1 0
crit2 0
crit3 0
doubtterr 1
alternative 132536
alternative_txt 0
multiple 0
success 0
suicide 0
attacktype1 0
attacktype1_txt 0
attacktype2 151806
attacktype2_txt 0
attacktype3 156460
attacktype3_txt 0
targtype1 0
targtype1_txt 0
targsubtype1 8155
targsubtype1_txt 0
corp1 42576
target1 648
natlty1 1228
natlty1_txt 0
targtype2 147863
targtype2_txt 0
targsubtype2 148303
targsubtype2_txt 0
corp2 148892
target2 147989
natlty2 148172
natlty2_txt 0
targtype3 155840
targtype3_txt 0
targsubtype3 155912
targsubtype3_txt 0
corp3 155990
target3 155841
natlty3 155868
natlty3_txt 0
gname 0
gsubname 152097
gname2 155553
gsubname2 156651
gname3 156608
ingroup 0
ingroup2 155553
ingroup3 156608
gsubname3 156766
motive 110180
guncertain1 378
guncertain2 155610
guncertain3 156612
nperps 71132
nperpcap 69510
claimed 66141
claimmode 143496
claimmode_txt 0
claim2 155677
claimmode2 156367
claimmode2_txt 0
claim3 156614
claimmode3 156696
claimmode3_txt 0
compclaim 152163
weaptype1 0
weaptype1_txt 0
weapsubtype1 17907
weapsubtype1_txt 0
weaptype2 146359
weaptype2_txt 0
weapsubtype2 147477
weapsubtype2_txt 0
weaptype3 155340
weaptype3_txt 0
weapsubtype3 155466
weapsubtype3_txt 0
weaptype4 156698
weaptype4_txt 0
weapsubtype4 156701
weapsubtype4_txt 0
weapdetail 50938
nkill 8945
nkillus 64457
nkillter 66388
nwound 14200
nwoundus 64706
nwoundte 68310
property 0
propextent 100420
propextent_txt 0
propvalue 125460
propcomment 107350
ishostkid 178
nhostkid 145504
nhostkidus 145559
nhours 153470
ndays 150190
divert 156483
kidhijcountry 153482
ransom 81680
ransomamt 155577
ransomamtus 156361
ransompaid 156149
ransompaidus 156370
ransomnote 156351
hostkidoutcome 148087
hostkidoutcome_txt 0
nreleased 148677
addnotes 134848
scite1 66330
scite2 95611
scite3 122640
dbsource 0
INT_LOG 0
INT_IDEO 0
INT_MISC 0
INT_ANY 0
related 136350
dtype: int64
dataframe types
eventid int64
iyear int64
imonth int64
iday int64
approxdate object
extended int64
resolution object
country int64
country_txt object
region int64
region_txt object
provstate object
city object
latitude float64
longitude float64
specificity int64
vicinity int64
location object
summary object
crit1 int64
crit2 int64
crit3 int64
doubtterr float64
alternative float64
alternative_txt object
multiple int64
success int64
suicide int64
attacktype1 int64
attacktype1_txt object
attacktype2 float64
attacktype2_txt object
attacktype3 float64
attacktype3_txt object
targtype1 int64
targtype1_txt object
targsubtype1 float64
targsubtype1_txt object
corp1 object
target1 object
natlty1 float64
natlty1_txt object
targtype2 float64
targtype2_txt object
targsubtype2 float64
targsubtype2_txt object
corp2 object
target2 object
natlty2 float64
natlty2_txt object
targtype3 float64
targtype3_txt object
targsubtype3 float64
targsubtype3_txt object
corp3 object
target3 object
natlty3 float64
natlty3_txt object
gname object
gsubname object
gname2 object
gsubname2 object
gname3 object
ingroup int64
ingroup2 float64
ingroup3 float64
gsubname3 object
motive object
guncertain1 float64
guncertain2 float64
guncertain3 float64
nperps float64
nperpcap float64
claimed float64
claimmode float64
claimmode_txt object
claim2 float64
claimmode2 float64
claimmode2_txt object
claim3 float64
claimmode3 float64
claimmode3_txt object
compclaim float64
weaptype1 int64
weaptype1_txt object
weapsubtype1 float64
weapsubtype1_txt object
weaptype2 float64
weaptype2_txt object
weapsubtype2 float64
weapsubtype2_txt object
weaptype3 float64
weaptype3_txt object
weapsubtype3 float64
weapsubtype3_txt object
weaptype4 float64
weaptype4_txt object
weapsubtype4 float64
weapsubtype4_txt object
weapdetail object
nkill float64
nkillus float64
nkillter float64
nwound float64
nwoundus float64
nwoundte float64
property int64
propextent float64
propextent_txt object
propvalue float64
propcomment object
ishostkid float64
nhostkid float64
nhostkidus float64
nhours float64
ndays float64
divert object
kidhijcountry object
ransom float64
ransomamt float64
ransomamtus float64
ransompaid float64
ransompaidus float64
ransomnote object
hostkidoutcome float64
hostkidoutcome_txt object
nreleased float64
addnotes object
scite1 object
scite2 object
scite3 object
dbsource object
INT_LOG int64
INT_IDEO int64
INT_MISC int64
INT_ANY int64
related object
dtype: object
dataframe shape
(156772, 137)
dataframe describe
eventid iyear imonth iday \
count 1.567720e+05 156772.000000 156772.000000 156772.000000
mean 2.000541e+11 2000.474083 6.484666 15.455215
std 1.298283e+09 12.982397 3.392225 8.815533
min 1.970000e+11 1970.000000 0.000000 0.000000
25% 1.989082e+11 1989.000000 4.000000 8.000000
50% 2.005071e+11 2005.000000 6.000000 15.000000
75% 2.013060e+11 2013.000000 9.000000 23.000000
max 2.015123e+11 2015.000000 12.000000 31.000000
extended country region latitude \
count 156772.000000 156772.000000 156772.000000 152253.000000
mean 0.041347 133.087401 6.970097 23.190988
std 0.199091 113.946290 2.967803 19.220723
min 0.000000 4.000000 1.000000 -53.154613
25% 0.000000 69.000000 5.000000 10.756961
50% 0.000000 101.000000 6.000000 31.285506
75% 0.000000 160.000000 10.000000 34.842222
max 1.000000 1004.000000 12.000000 74.633553
longitude specificity vicinity crit1 \
count 152253.000000 156772.000000 156772.000000 156772.000000
mean 24.210467 1.452632 0.067423 0.988327
std 59.900831 1.016971 0.289041 0.107410
min -176.176447 1.000000 -9.000000 0.000000
25% -1.929857 1.000000 0.000000 1.000000
50% 41.919647 1.000000 0.000000 1.000000
75% 68.416974 1.000000 0.000000 1.000000
max 179.366667 5.000000 1.000000 1.000000
crit2 crit3 doubtterr alternative \
count 156772.000000 156772.000000 156771.000000 24236.000000
mean 0.992690 0.882919 -0.636897 1.298935
std 0.085186 0.321518 2.621422 0.682270
min 0.000000 0.000000 -9.000000 1.000000
25% 1.000000 1.000000 0.000000 1.000000
50% 1.000000 1.000000 0.000000 1.000000
75% 1.000000 1.000000 0.000000 1.000000
max 1.000000 1.000000 1.000000 5.000000
multiple success suicide attacktype1 \
count 156772.000000 156772.000000 156772.000000 156772.000000
mean 0.130374 0.903612 0.030433 3.187081
std 0.336716 0.295124 0.171775 1.870064
min 0.000000 0.000000 0.000000 1.000000
25% 0.000000 1.000000 0.000000 2.000000
50% 0.000000 1.000000 0.000000 3.000000
75% 0.000000 1.000000 0.000000 3.000000
max 1.000000 1.000000 1.000000 9.000000
attacktype2 attacktype3 targtype1 targsubtype1 natlty1 \
count 4966.000000 312.000000 156772.000000 148617.000000 155544.000000
mean 3.615989 4.884615 8.305112 46.654885 127.635434
std 2.214695 2.310222 6.642518 31.108047 87.606000
min 1.000000 1.000000 1.000000 1.000000 4.000000
25% 2.000000 2.000000 3.000000 22.000000 78.000000
50% 2.000000 6.000000 4.000000 34.000000 104.000000
75% 6.000000 7.000000 14.000000 74.000000 177.000000
max 9.000000 8.000000 22.000000 111.000000 1004.000000
targtype2 targsubtype2 natlty2 targtype3 targsubtype3 \
count 8909.000000 8469.000000 8600.000000 932.000000 860.000000
mean 10.117858 54.622624 130.115930 9.798283 54.862791
std 5.764911 25.830595 122.714115 5.835194 26.779003
min 1.000000 1.000000 4.000000 1.000000 1.000000
25% 4.000000 29.000000 92.000000 3.000000 25.000000
50% 14.000000 67.000000 97.000000 14.000000 67.000000
75% 14.000000 69.000000 182.000000 14.000000 73.000000
max 22.000000 111.000000 1004.000000 22.000000 109.000000
natlty3 ingroup ingroup2 ingroup3 guncertain1 \
count 904.000000 156772.000000 1219.000000 164.000000 156394.000000
mean 139.287611 4475.847071 19255.760459 19952.298780 0.089454
std 152.473926 10484.350060 15913.313956 14335.366422 0.285398
min 4.000000 -9.000000 -9.000000 -9.000000 0.000000
25% 74.000000 -9.000000 838.000000 4292.000000 0.000000
50% 101.000000 359.000000 20193.000000 20273.000000 0.000000
75% 182.000000 652.000000 40021.000000 30227.000000 0.000000
max 1004.000000 100047.000000 50011.000000 40486.000000 1.000000
guncertain2 guncertain3 nperps nperpcap claimed \
count 1162.000000 160.000000 85640.000000 87262.000000 90631.000000
mean 0.286575 0.262500 -61.504437 -1.572345 -0.001037
std 0.452356 0.441374 243.824221 13.099647 1.210258
min 0.000000 0.000000 -99.000000 -99.000000 -9.000000
25% 0.000000 0.000000 -99.000000 0.000000 0.000000
50% 0.000000 0.000000 -99.000000 0.000000 0.000000
75% 1.000000 1.000000 1.000000 0.000000 0.000000
max 1.000000 1.000000 25000.000000 406.000000 2.000000
claimmode claim2 claimmode2 claim3 claimmode3 \
count 13276.000000 1095.000000 405.000000 158.000000 76.000000
mean 7.019434 0.234703 7.387654 0.468354 7.552632
std 2.706719 1.223132 2.990140 0.500584 3.052408
min 0.000000 -9.000000 1.000000 0.000000 1.000000
25% 5.000000 0.000000 7.000000 0.000000 7.000000
50% 8.000000 0.000000 8.000000 0.000000 9.000000
75% 10.000000 1.000000 10.000000 1.000000 10.000000
max 10.000000 1.000000 10.000000 1.000000 10.000000
compclaim weaptype1 weapsubtype1 weaptype2 weapsubtype2 \
count 4609.000000 156772.000000 138865.000000 10413.000000 9295.000000
mean -6.651117 6.408587 10.949519 6.626909 10.591716
std 4.023720 2.130785 6.438986 2.085466 7.492221
min -9.000000 1.000000 1.000000 1.000000 1.000000
25% -9.000000 5.000000 5.000000 5.000000 5.000000
50% -9.000000 6.000000 12.000000 6.000000 7.000000
75% 0.000000 6.000000 16.000000 8.000000 18.000000
max 1.000000 13.000000 29.000000 13.000000 28.000000
weaptype3 weapsubtype3 weaptype4 weapsubtype4 nkill \
count 1432.000000 1306.000000 74.000000 71.000000 147827.000000
mean 6.804469 11.426493 6.243243 10.788732 2.359237
std 2.097760 8.205943 1.497128 8.146718 11.421270
min 2.000000 1.000000 5.000000 2.000000 0.000000
25% 5.000000 4.000000 5.000000 3.000000 0.000000
50% 6.000000 7.000000 6.000000 8.000000 0.000000
75% 8.000000 19.000000 6.000000 16.000000 2.000000
max 13.000000 28.000000 12.000000 28.000000 1500.000000
nkillus nkillter nwound nwoundus nwoundte \
count 92315.000000 90384.000000 142572.000000 92066.000000 88462.000000
mean 0.056275 0.419964 3.089926 0.045587 0.081583
std 6.391723 3.966899 22.722313 3.440730 1.357706
min 0.000000 0.000000 0.000000 0.000000 0.000000
25% 0.000000 0.000000 0.000000 0.000000 0.000000
50% 0.000000 0.000000 0.000000 0.000000 0.000000
75% 0.000000 0.000000 2.000000 0.000000 0.000000
max 1357.500000 500.000000 5500.000000 751.000000 200.000000
property propextent propvalue ishostkid nhostkid \
count 156772.000000 56352.000000 3.131200e+04 156594.000000 11268.000000
mean -0.434051 3.302190 2.496208e+05 0.060060 3.962549
std 3.031945 0.493053 1.730076e+07 0.418836 211.671702
min -9.000000 1.000000 -9.900000e+01 -9.000000 -99.000000
25% 0.000000 3.000000 -9.900000e+01 0.000000 1.000000
50% 1.000000 3.000000 -9.900000e+01 0.000000 1.000000
75% 1.000000 4.000000 5.000000e+03 0.000000 4.000000
max 1.000000 4.000000 2.700000e+09 1.000000 17000.000000
nhostkidus nhours ndays ransom ransomamt \
count 11213.000000 3302.000000 6582.000000 75092.000000 1.195000e+03
mean -0.392402 -37.322229 -30.865846 -0.143664 3.320127e+06
std 7.189533 87.837036 113.108909 1.193720 3.187694e+07
min -99.000000 -99.000000 -99.000000 -9.000000 -9.900000e+01
25% 0.000000 -99.000000 -99.000000 0.000000 0.000000e+00
50% 0.000000 0.000000 0.000000 0.000000 1.250000e+04
75% 0.000000 0.000000 4.000000 0.000000 4.115000e+05
max 86.000000 999.000000 1941.000000 1.000000 1.000000e+09
ransomamtus ransompaid ransompaidus hostkidoutcome nreleased \
count 4.110000e+02 6.230000e+02 402.000000 8685.000000 8095.000000
mean 5.454451e+05 4.319721e+05 305.196517 4.592170 -27.788635
std 6.665967e+06 2.589893e+06 3409.027685 2.049184 58.524976
min -9.900000e+01 -9.900000e+01 -99.000000 1.000000 -99.000000
25% 0.000000e+00 -9.900000e+01 0.000000 2.000000 -99.000000
50% 0.000000e+00 0.000000e+00 0.000000 4.000000 0.000000
75% 0.000000e+00 4.276840e+03 0.000000 7.000000 1.000000
max 1.320000e+08 4.100000e+07 48000.000000 7.000000 1201.000000
INT_LOG INT_IDEO INT_MISC INT_ANY
count 156772.000000 156772.000000 156772.000000 156772.000000
mean -4.834645 -4.789114 0.093894 -4.221124
std 4.528862 4.589779 0.602442 4.686143
min -9.000000 -9.000000 -9.000000 -9.000000
25% -9.000000 -9.000000 0.000000 -9.000000
50% -9.000000 -9.000000 0.000000 0.000000
75% 0.000000 0.000000 0.000000 0.000000
max 1.000000 1.000000 1.000000 1.000000
dataframe duplicate rows
0
eventid
156772
iyear
45
imonth
13
iday
32
approxdate
1426
extended
2
resolution
2657
country
206
country_txt
206
region
12
region_txt
12
provstate
2509
city
31324
latitude
52021
longitude
51632
specificity
5
vicinity
3
location
35797
summary
88703
crit1
2
crit2
2
crit3
2
doubtterr
3
alternative
5
alternative_txt
6
multiple
2
success
2
suicide
2
attacktype1
9
attacktype1_txt
9
attacktype2
9
attacktype2_txt
10
attacktype3
8
attacktype3_txt
9
targtype1
22
targtype1_txt
22
targsubtype1
110
targsubtype1_txt
111
corp1
29295
target1
79947
natlty1
212
natlty1_txt
213
targtype2
22
targtype2_txt
23
targsubtype2
103
targsubtype2_txt
104
corp2
2344
target2
4562
natlty2
154
natlty2_txt
155
targtype3
20
targtype3_txt
21
targsubtype3
85
targsubtype3_txt
86
corp3
351
target3
631
natlty3
101
natlty3_txt
102
gname
3290
gsubname
992
gname2
334
gsubname2
43
gname3
77
ingroup
3290
ingroup2
334
ingroup3
77
gsubname3
6
motive
11682
guncertain1
2
guncertain2
2
guncertain3
2
nperps
113
nperpcap
50
claimed
4
claimmode
11
claimmode_txt
12
claim2
3
claimmode2
9
claimmode2_txt
10
claim3
2
claimmode3
8
claimmode3_txt
9
compclaim
3
weaptype1
12
weaptype1_txt
12
weapsubtype1
28
weapsubtype1_txt
29
weaptype2
11
weaptype2_txt
12
weapsubtype2
26
weapsubtype2_txt
27
weaptype3
10
weaptype3_txt
11
weapsubtype3
22
weapsubtype3_txt
23
weaptype4
5
weaptype4_txt
6
weapsubtype4
16
weapsubtype4_txt
17
weapdetail
16987
nkill
338
nkillus
30
nkillter
133
nwound
376
nwoundus
43
nwoundte
64
property
3
propextent
4
propextent_txt
5
propvalue
604
propcomment
17458
ishostkid
3
nhostkid
221
nhostkidus
28
nhours
34
ndays
289
divert
142
kidhijcountry
217
ransom
3
ransomamt
350
ransomamtus
21
ransompaid
122
ransompaidus
8
ransomnote
296
hostkidoutcome
7
hostkidoutcome_txt
8
nreleased
155
addnotes
12761
scite1
66822
scite2
50239
scite3
28554
dbsource
26
INT_LOG
3
INT_IDEO
3
INT_MISC
3
INT_ANY
3
related
20029
## no duplicate rows
##missing values for lots of columns
##event id is unique identifier for each row
##There are 13 unique months, including NA for unknown
##1993 NOT included
data.alternative_txt.unique() ##not sure what this is, but seems interesting
array(['.', 'Other Crime Type', 'Insurgency/Guerilla Action',
'Intra/Inter-group Conflict', 'State Actors',
'Lack of Intentionality'], dtype=object)
data.attacktype1_txt.unique()
array(['Assassination', 'Hostage Taking (Kidnapping)', 'Bombing/Explosion',
'Facility/Infrastructure Attack', 'Armed Assault', 'Hijacking',
'Unknown', 'Unarmed Assault', 'Hostage Taking (Barricade Incident)'], dtype=object)
data.weaptype1_txt.unique()
array(['Unknown', 'Explosives/Bombs/Dynamite', 'Incendiary', 'Firearms',
'Chemical', 'Fake Weapons', 'Melee', 'Sabotage Equipment',
'Vehicle (not to include vehicle-borne explosives, i.e., car or truck bombs)',
'Radiological', 'Other', 'Biological'], dtype=object)
data.region_txt.unique() ##regions of the world represented in the dataset
array(['Central America & Caribbean', 'North America', 'Southeast Asia',
'Western Europe', 'East Asia', 'South America', 'Eastern Europe',
'Sub-Saharan Africa', 'Middle East & North Africa',
'Australasia & Oceania', 'South Asia', 'Central Asia'], dtype=object)
##expanding on Mike Salmon's idea to generate random numbers for month and day where values are missing, and imputing
##those values
zeromonth = (data.imonth == 0) ##creating filters
zeroday = (data.iday == 0)
data.loc[zeromonth, "imonth"] = data.imonth.apply(lambda x: np.random.randint(1,13)) ##mapping random month values
## a function to fill in appropriate days of the month
def makemyday(month, day):
month30 = [4, 6, 9, 11]
month31 = [1, 3, 5, 7, 8, 10, 12]
if month == 2:
day = np.random.randint(1,29)
elif month in month30:
day = np.random.randint(1,31)
elif month in month31:
day = np.random.randint(1,32)
else:
pass
return day
data.loc[zeroday, "iday"] = data.apply(lambda row: makemyday(row["imonth"], row["iday"]), axis = 1)
data.rename(columns={"iyear":"year", "imonth":"month", "iday":"day"}, inplace=True)
data.approxdate = pd.to_datetime(data[["year", "month", "day"]])
data["year"] = data.approxdate.dt.year
data["month"] = data.approxdate.dt.month
#data.to_csv("../../../For_DSI/GTD_Project/GTD_fixeddate.csv", index = False)
bombdata = data[["eventid", "approxdate", "year", "month", "country", "country_txt", "region", "region_txt", "city",
"latitude", "longitude", "targtype1", "targtype1_txt", "targsubtype1",
"targsubtype1_txt", "corp1", "target1", "natlty1", "natlty1_txt", "gname",
"weapsubtype1", "weapsubtype1_txt", "nkill", "nkillter", "nwound", "nwoundte", "propextent", "propextent_txt", "propcomment",
"addnotes", "scite1", "scite2", "scite3", "dbsource"]][data.attacktype1 == 3]
#bombdata.to_csv("../../../For_DSI/GTD_Project/bombdata.csv", index = False)
sns.set(style = "whitegrid")
sns.stripplot(x="region_txt", y="nkill", data=data, jitter = True)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), <a list of 12 Text xticklabel objects>)
sns.stripplot(x="attacktype1_txt", y="nkill", data=data, jitter = True)
plt.xticks(rotation = 90)
(array([0, 1, 2, 3, 4, 5, 6, 7, 8]), <a list of 9 Text xticklabel objects>)
sns.countplot(x="attacktype1_txt", data=data)
plt.xticks(rotation = 90)
(array([0, 1, 2, 3, 4, 5, 6, 7, 8]), <a list of 9 Text xticklabel objects>)
sns.countplot(x="weaptype1_txt", data=data)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), <a list of 12 Text xticklabel objects>)
sns.countplot(x="weapsubtype1_txt", data=bombdata)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24]),
<a list of 25 Text xticklabel objects>)
sns.countplot(x="region_txt", data=bombdata)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]), <a list of 12 Text xticklabel objects>)
sns.countplot(x="year", data=bombdata)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]),
<a list of 45 Text xticklabel objects>)
g = sns.FacetGrid(bombdata, col="region_txt", col_wrap=4)
g = (g.map(plt.hist, "year"))
deadlybombs = bombdata.groupby("approxdate").nkill.agg(["sum"])
dbyear = bombdata.groupby("year").nkill.agg(["sum"])
dbyear.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x13e8c5510>
deadlybombs.resample('Q').sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x13d253890>
dbmonth = deadlybombs.resample('M').sum()
dbmonth.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x11d831090>
##Tableau Visualization showing terror attacks by country, by year:
## https://public.tableau.com/shared/34M3H9RCR?:display_count=yes
plt.subplots(figsize=(12, 8))
sns.set(font_scale = 0.9)
sns.heatmap(bombdata.corr(), annot = True, linewidths = 0.4,
cmap = "YlGnBu")
<matplotlib.axes._subplots.AxesSubplot at 0x13d3c8510>
g = sns.factorplot(x="year", col="region_txt",
data=bombdata, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]),
<a list of 45 Text xticklabel objects>)
g = sns.factorplot(x="year", col="region_txt",
data=data, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]),
<a list of 45 Text xticklabel objects>)
g = sns.factorplot(x="attacktype1_txt", col="region_txt",
data=data, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([0, 1, 2, 3, 4, 5, 6, 7, 8]), <a list of 9 Text xticklabel objects>)
data.groupby("region_txt").attacktype1_txt.value_counts()
region_txt attacktype1_txt
Australasia & Oceania Bombing/Explosion 72
Facility/Infrastructure Attack 52
Armed Assault 47
Assassination 30
Unknown 16
Hostage Taking (Kidnapping) 11
Unarmed Assault 10
Hostage Taking (Barricade Incident) 5
Hijacking 3
Central America & Caribbean Armed Assault 4358
Bombing/Explosion 3239
Assassination 1252
Hostage Taking (Kidnapping) 501
Facility/Infrastructure Attack 401
Unknown 354
Hostage Taking (Barricade Incident) 187
Hijacking 26
Unarmed Assault 19
Central Asia Bombing/Explosion 224
Armed Assault 112
Assassination 112
Hostage Taking (Kidnapping) 44
Facility/Infrastructure Attack 19
Unknown 16
Hijacking 7
Unarmed Assault 3
Hostage Taking (Barricade Incident) 1
East Asia Bombing/Explosion 325
Facility/Infrastructure Attack 196
Armed Assault 114
Assassination 55
Unarmed Assault 41
Unknown 22
Hijacking 17
Hostage Taking (Kidnapping) 14
Hostage Taking (Barricade Incident) 2
Eastern Europe Bombing/Explosion 2665
Armed Assault 1225
Assassination 374
Facility/Infrastructure Attack 222
Hostage Taking (Kidnapping) 201
Unknown 111
Unarmed Assault 51
Hijacking 26
Hostage Taking (Barricade Incident) 17
Middle East & North Africa Bombing/Explosion 24053
Armed Assault 8057
Assassination 3889
Hostage Taking (Kidnapping) 2029
Unknown 1133
Facility/Infrastructure Attack 920
Unarmed Assault 144
Hijacking 118
Hostage Taking (Barricade Incident) 79
North America Bombing/Explosion 1518
Facility/Infrastructure Attack 833
Armed Assault 387
Assassination 231
Hostage Taking (Kidnapping) 120
Unarmed Assault 68
Hostage Taking (Barricade Incident) 61
Unknown 32
Hijacking 18
South America Bombing/Explosion 8931
Armed Assault 3797
Assassination 2705
Hostage Taking (Kidnapping) 1358
Facility/Infrastructure Attack 754
Unknown 742
Hostage Taking (Barricade Incident) 228
Hijacking 66
Unarmed Assault 47
South Asia Bombing/Explosion 18247
Armed Assault 9750
Assassination 3707
Hostage Taking (Kidnapping) 2653
Facility/Infrastructure Attack 1702
Unknown 1385
Unarmed Assault 241
Hijacking 83
Hostage Taking (Barricade Incident) 73
Southeast Asia Bombing/Explosion 4019
Armed Assault 3450
Assassination 1060
Facility/Infrastructure Attack 761
Hostage Taking (Kidnapping) 603
Unknown 374
Hostage Taking (Barricade Incident) 37
Hijacking 32
Unarmed Assault 24
Sub-Saharan Africa Armed Assault 4671
Bombing/Explosion 4316
Hostage Taking (Kidnapping) 1315
Assassination 1265
Unknown 1046
Facility/Infrastructure Attack 598
Hijacking 99
Unarmed Assault 63
Hostage Taking (Barricade Incident) 61
Western Europe Bombing/Explosion 8354
Assassination 2902
Facility/Infrastructure Attack 2391
Armed Assault 1586
Hostage Taking (Kidnapping) 266
Unknown 259
Unarmed Assault 117
Hostage Taking (Barricade Incident) 84
Hijacking 61
Name: attacktype1_txt, dtype: int64
g = sns.factorplot(x="year", col="attacktype1_txt",
data=data, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]),
<a list of 45 Text xticklabel objects>)
data.groupby("year").attacktype1_txt.value_counts()
year attacktype1_txt
1970 Bombing/Explosion 333
Facility/Infrastructure Attack 174
Armed Assault 61
Hostage Taking (Kidnapping) 38
Assassination 22
Hijacking 11
Unknown 6
Hostage Taking (Barricade Incident) 3
Unarmed Assault 3
1971 Bombing/Explosion 238
Facility/Infrastructure Attack 88
Assassination 70
Armed Assault 44
Hostage Taking (Kidnapping) 20
Hijacking 6
Unknown 3
Hostage Taking (Barricade Incident) 1
1972 Assassination 193
Bombing/Explosion 186
Armed Assault 63
Facility/Infrastructure Attack 19
Hostage Taking (Kidnapping) 16
Hijacking 12
Hostage Taking (Barricade Incident) 4
Unknown 1
1973 Assassination 164
Bombing/Explosion 149
Armed Assault 62
Hostage Taking (Kidnapping) 43
Facility/Infrastructure Attack 36
Hijacking 8
Hostage Taking (Barricade Incident) 7
Unarmed Assault 3
Unknown 1
1974 Bombing/Explosion 284
Assassination 158
Armed Assault 46
Facility/Infrastructure Attack 42
Hostage Taking (Kidnapping) 37
Hostage Taking (Barricade Incident) 5
Unarmed Assault 4
Hijacking 3
Unknown 1
1975 Bombing/Explosion 370
Assassination 181
Armed Assault 81
Facility/Infrastructure Attack 64
Hostage Taking (Kidnapping) 27
Hostage Taking (Barricade Incident) 13
Unknown 3
Hijacking 1
1976 Bombing/Explosion 419
Assassination 204
Armed Assault 124
Facility/Infrastructure Attack 113
Hostage Taking (Kidnapping) 45
Hostage Taking (Barricade Incident) 6
Unknown 5
Hijacking 4
Unarmed Assault 3
1977 Bombing/Explosion 635
Armed Assault 255
Facility/Infrastructure Attack 182
Assassination 146
Hostage Taking (Kidnapping) 67
Unknown 14
Hostage Taking (Barricade Incident) 13
Hijacking 7
1978 Bombing/Explosion 644
Assassination 263
...
2008 Hostage Taking (Kidnapping) 392
Facility/Infrastructure Attack 285
Assassination 219
Unknown 106
Unarmed Assault 33
Hijacking 15
Hostage Taking (Barricade Incident) 2
2009 Bombing/Explosion 2565
Armed Assault 1118
Facility/Infrastructure Attack 349
Hostage Taking (Kidnapping) 279
Assassination 227
Unknown 137
Hijacking 23
Unarmed Assault 19
Hostage Taking (Barricade Incident) 4
2010 Bombing/Explosion 2507
Armed Assault 1114
Hostage Taking (Kidnapping) 390
Assassination 360
Facility/Infrastructure Attack 293
Unknown 116
Unarmed Assault 21
Hijacking 13
Hostage Taking (Barricade Incident) 7
2011 Bombing/Explosion 2587
Armed Assault 1391
Hostage Taking (Kidnapping) 361
Assassination 342
Facility/Infrastructure Attack 242
Unknown 113
Unarmed Assault 20
Hijacking 9
Hostage Taking (Barricade Incident) 2
2012 Bombing/Explosion 5080
Armed Assault 2081
Assassination 458
Hostage Taking (Kidnapping) 352
Facility/Infrastructure Attack 293
Unknown 182
Unarmed Assault 29
Hostage Taking (Barricade Incident) 18
Hijacking 5
2013 Bombing/Explosion 6669
Armed Assault 2959
Assassination 845
Hostage Taking (Kidnapping) 628
Facility/Infrastructure Attack 555
Unknown 253
Unarmed Assault 38
Hostage Taking (Barricade Incident) 26
Hijacking 17
2014 Bombing/Explosion 8759
Armed Assault 4087
Hostage Taking (Kidnapping) 1396
Assassination 922
Unknown 782
Facility/Infrastructure Attack 764
Hijacking 48
Hostage Taking (Barricade Incident) 45
Unarmed Assault 37
2015 Bombing/Explosion 7615
Armed Assault 3353
Hostage Taking (Kidnapping) 1175
Assassination 917
Unknown 855
Facility/Infrastructure Attack 682
Unarmed Assault 96
Hostage Taking (Barricade Incident) 76
Hijacking 37
Name: attacktype1_txt, dtype: int64
data.groupby("year").nkill.agg(["sum"]).plot()
<matplotlib.axes._subplots.AxesSubplot at 0x144202290>
data.groupby("year").nwound.agg(["sum"]).plot()
<matplotlib.axes._subplots.AxesSubplot at 0x1442d2b90>
data["is_bombing"] = [1 if (type == 3) else 0 for type in data.attacktype1]
data.is_bombing.value_counts() ##There is a 48% chance that an attack was a bombing
0 80809 1 75963 Name: is_bombing, dtype: int64
y = data.is_bombing
data.corr()
| eventid | year | month | day | extended | country | region | latitude | longitude | specificity | vicinity | crit1 | crit2 | crit3 | doubtterr | alternative | multiple | success | suicide | attacktype1 | attacktype2 | attacktype3 | targtype1 | targsubtype1 | natlty1 | targtype2 | targsubtype2 | natlty2 | targtype3 | targsubtype3 | natlty3 | ingroup | ingroup2 | ingroup3 | guncertain1 | guncertain2 | guncertain3 | nperps | nperpcap | claimed | claimmode | claim2 | claimmode2 | claim3 | claimmode3 | compclaim | weaptype1 | weapsubtype1 | weaptype2 | weapsubtype2 | weaptype3 | weapsubtype3 | weaptype4 | weapsubtype4 | nkill | nkillus | nkillter | nwound | nwoundus | nwoundte | property | propextent | propvalue | ishostkid | nhostkid | nhostkidus | nhours | ndays | ransom | ransomamt | ransomamtus | ransompaid | ransompaidus | hostkidoutcome | nreleased | INT_LOG | INT_IDEO | INT_MISC | INT_ANY | is_bombing | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| eventid | 1.000000 | 0.999996 | 0.010205 | 0.007057 | 0.088933 | -0.144918 | 0.391129 | 0.172221 | 0.553091 | 0.029533 | 0.077430 | 0.000168 | 0.024546 | 0.008004 | 0.278633 | 0.063645 | 0.091466 | -0.049866 | 0.134558 | 0.048222 | 0.030693 | 0.054855 | 0.068833 | 0.047099 | -0.023637 | 0.096598 | 0.113583 | -0.104678 | 0.149229 | 0.081981 | 0.004898 | 0.320870 | 0.467095 | 0.492234 | 0.079657 | -0.056744 | -0.137790 | -0.137350 | 0.473824 | 0.126256 | 0.115381 | 0.030646 | 0.124254 | -0.417761 | 0.082421 | 0.272146 | -0.038496 | 0.100979 | 0.049107 | 0.029094 | 0.050598 | 0.083092 | -0.136695 | 0.031511 | 0.013383 | -0.013713 | 0.015116 | 0.031025 | -0.030874 | 0.019343 | -0.295301 | -0.154098 | -0.012391 | -0.010183 | 0.004759 | -0.018742 | -0.455918 | -0.188772 | -0.271519 | -0.002849 | -0.000461 | -0.169650 | -0.172339 | 0.292161 | -0.228536 | -0.234006 | -0.231593 | -0.077012 | -0.266880 | 0.092875 |
| year | 0.999996 | 1.000000 | 0.007585 | 0.006978 | 0.088923 | -0.144894 | 0.391142 | 0.172276 | 0.553111 | 0.029520 | 0.077450 | 0.000140 | 0.024544 | 0.008009 | 0.278671 | 0.063702 | 0.091481 | -0.049852 | 0.134543 | 0.048197 | 0.030941 | 0.055001 | 0.068837 | 0.047106 | -0.023609 | 0.096492 | 0.113482 | -0.104635 | 0.149068 | 0.081870 | 0.004864 | 0.320863 | 0.466974 | 0.491812 | 0.079675 | -0.056589 | -0.137356 | -0.137413 | 0.473655 | 0.126134 | 0.115327 | 0.031130 | 0.124085 | -0.417771 | 0.082659 | 0.271551 | -0.038523 | 0.100967 | 0.049068 | 0.029045 | 0.050625 | 0.083471 | -0.136413 | 0.031232 | 0.013372 | -0.013735 | 0.015090 | 0.031020 | -0.030885 | 0.019322 | -0.295310 | -0.154093 | -0.012382 | -0.010212 | 0.004736 | -0.018770 | -0.455884 | -0.188874 | -0.271276 | -0.002849 | -0.000810 | -0.169685 | -0.172205 | 0.292178 | -0.228479 | -0.234008 | -0.231594 | -0.077005 | -0.266873 | 0.092877 |
| month | 0.010205 | 0.007585 | 1.000000 | 0.005485 | 0.001372 | -0.010645 | 0.000188 | -0.015902 | -0.002390 | 0.002428 | -0.007522 | 0.001693 | 0.001159 | 0.000266 | -0.012201 | -0.018943 | -0.003890 | -0.005410 | 0.007523 | 0.009717 | -0.041601 | -0.024191 | -0.001157 | -0.002147 | -0.009960 | 0.028223 | 0.025504 | -0.006758 | 0.039036 | 0.027673 | 0.008852 | 0.005227 | 0.037771 | 0.035673 | -0.006712 | -0.045888 | -0.084985 | 0.016581 | 0.035928 | 0.026994 | 0.024605 | -0.096113 | 0.017931 | 0.029200 | -0.082247 | 0.133230 | 0.009847 | 0.004606 | 0.010822 | 0.013472 | -0.045108 | -0.128683 | -0.059837 | 0.063582 | 0.004155 | 0.004285 | 0.005767 | 0.002004 | 0.001435 | 0.004519 | -0.000112 | -0.006267 | -0.003645 | 0.009172 | 0.009363 | 0.009622 | -0.026648 | -0.004028 | -0.073089 | -0.001555 | 0.066517 | 0.003059 | -0.026813 | 0.016438 | -0.024800 | -0.003852 | -0.003547 | -0.003416 | -0.007753 | -0.001512 |
| day | 0.007057 | 0.006978 | 0.005485 | 1.000000 | -0.001327 | 0.004825 | 0.007371 | 0.001397 | 0.008675 | -0.007800 | -0.006319 | 0.011041 | -0.004006 | -0.002291 | -0.001802 | -0.004179 | -0.003096 | -0.005132 | 0.000833 | -0.004886 | 0.012287 | -0.144920 | -0.000268 | -0.002307 | 0.006993 | 0.016416 | 0.020875 | -0.025942 | -0.054502 | -0.039834 | -0.050251 | 0.004741 | 0.027022 | 0.023289 | -0.001641 | 0.011782 | -0.118670 | -0.015820 | 0.005552 | 0.003392 | 0.000449 | -0.042107 | 0.035093 | 0.131652 | 0.043476 | 0.031835 | 0.001501 | 0.008442 | 0.021216 | -0.005620 | 0.036411 | -0.030031 | -0.001784 | 0.082344 | -0.004749 | -0.002144 | -0.004134 | 0.000517 | 0.001890 | 0.001184 | -0.004497 | -0.001644 | -0.001118 | 0.008659 | -0.018251 | -0.003203 | -0.047535 | 0.007152 | -0.001384 | 0.013596 | 0.019458 | 0.005159 | 0.002655 | -0.001562 | 0.013693 | -0.006595 | -0.006918 | -0.003545 | -0.005982 | 0.009514 |
| extended | 0.088933 | 0.088923 | 0.001372 | -0.001327 | 1.000000 | -0.026851 | 0.032504 | -0.019201 | 0.037165 | 0.054347 | 0.017177 | -0.016506 | 0.000896 | 0.046728 | 0.008817 | 0.090376 | -0.020751 | 0.065440 | -0.033063 | 0.268167 | 0.006901 | -0.021069 | 0.007149 | 0.013145 | 0.011975 | -0.028854 | -0.012712 | 0.041500 | 0.060268 | 0.061809 | 0.015257 | 0.096260 | 0.035453 | 0.105548 | 0.039100 | -0.077274 | -0.169880 | -0.003213 | 0.017236 | 0.005034 | 0.053912 | -0.207015 | 0.030452 | -0.057406 | -0.062390 | 0.061214 | 0.201390 | -0.114555 | 0.150400 | 0.138510 | 0.084213 | 0.101688 | 0.117879 | 0.208251 | 0.017696 | -0.001541 | 0.004419 | -0.012349 | -0.001891 | -0.001899 | -0.012908 | 0.029112 | -0.001526 | 0.408247 | 0.015291 | -0.003039 | 0.178986 | 0.055386 | -0.179355 | -0.005537 | 0.033104 | -0.047390 | 0.016856 | 0.175605 | -0.185049 | 0.050541 | 0.053485 | 0.030440 | 0.064947 | -0.195264 |
| country | -0.144918 | -0.144894 | -0.010645 | 0.004825 | -0.026851 | 1.000000 | 0.150792 | 0.216451 | 0.002030 | -0.084609 | -0.016601 | -0.003257 | -0.040363 | -0.044322 | 0.043077 | 0.054848 | -0.026759 | -0.055631 | -0.050038 | -0.020701 | 0.039805 | 0.091397 | -0.023511 | -0.021324 | 0.572763 | -0.028416 | -0.026888 | 0.484330 | -0.017009 | -0.015717 | 0.412045 | 0.043812 | 0.182534 | 0.223098 | -0.016782 | -0.017398 | -0.282162 | -0.002085 | -0.069664 | -0.012140 | -0.128221 | 0.033483 | -0.082198 | 0.157317 | 0.103578 | 0.002878 | -0.021702 | -0.040641 | -0.008422 | -0.023695 | 0.018337 | 0.046826 | 0.301899 | 0.294948 | -0.016915 | 0.005565 | -0.008828 | -0.009452 | 0.006397 | -0.024807 | 0.032665 | -0.023932 | 0.038869 | -0.019809 | -0.010311 | -0.003277 | -0.058584 | -0.030025 | 0.027569 | 0.009545 | 0.056563 | -0.081457 | -0.036869 | 0.017857 | -0.047574 | 0.079423 | 0.077992 | 0.212349 | 0.168451 | -0.051108 |
| region | 0.391129 | 0.391142 | 0.000188 | 0.007371 | 0.032504 | 0.150792 | 1.000000 | 0.341703 | 0.452172 | -0.089509 | 0.075372 | 0.018375 | -0.015700 | 0.012154 | 0.071668 | 0.066021 | -0.000797 | -0.020784 | 0.100482 | -0.004438 | 0.103274 | 0.134865 | 0.029113 | 0.022808 | 0.143829 | 0.068391 | 0.064815 | 0.118185 | 0.122288 | 0.074671 | 0.139252 | 0.232674 | 0.464819 | 0.391049 | -0.007518 | -0.080812 | -0.160004 | -0.075079 | 0.223525 | -0.000064 | 0.153652 | 0.092754 | 0.285420 | 0.057395 | -0.184638 | -0.066079 | 0.004494 | 0.093825 | 0.053868 | 0.048491 | 0.107404 | 0.143923 | 0.051591 | 0.012752 | 0.037647 | -0.015470 | 0.022470 | 0.045948 | -0.020898 | -0.011936 | -0.181102 | -0.069495 | -0.004394 | -0.024141 | 0.003637 | -0.032196 | -0.246651 | -0.120691 | -0.062253 | 0.032361 | 0.078801 | -0.053309 | -0.081445 | 0.192969 | -0.160487 | -0.153248 | -0.148840 | 0.048161 | -0.113385 | 0.075053 |
| latitude | 0.172221 | 0.172276 | -0.015902 | 0.001397 | -0.019201 | 0.216451 | 0.341703 | 1.000000 | 0.283142 | -0.021387 | 0.009589 | 0.019179 | -0.005304 | -0.004557 | 0.067820 | 0.034444 | -0.026256 | -0.066895 | 0.067662 | 0.002602 | -0.174193 | -0.211265 | -0.037395 | -0.051064 | 0.031810 | 0.072788 | 0.074326 | -0.151581 | 0.007107 | -0.019372 | -0.116506 | 0.042011 | 0.189383 | 0.117800 | -0.061125 | -0.057626 | 0.080799 | -0.082155 | -0.059984 | 0.030214 | -0.052990 | 0.098388 | -0.153730 | 0.177016 | 0.009961 | -0.016673 | -0.022132 | 0.104991 | -0.031830 | -0.058287 | -0.098457 | -0.131871 | -0.170134 | -0.142039 | -0.023306 | 0.006760 | -0.015072 | 0.020930 | 0.008200 | 0.012645 | -0.086839 | -0.052534 | 0.009192 | -0.024914 | 0.019236 | 0.002625 | -0.133086 | -0.044167 | -0.026167 | 0.060577 | 0.062228 | -0.064826 | 0.034211 | 0.051753 | 0.006914 | -0.140778 | -0.139897 | 0.104096 | -0.079731 | 0.075630 |
| longitude | 0.553091 | 0.553111 | -0.002390 | 0.008675 | 0.037165 | 0.002030 | 0.452172 | 0.283142 | 1.000000 | 0.108872 | 0.061830 | -0.005409 | -0.008859 | 0.030443 | 0.108898 | 0.063357 | -0.009770 | -0.032825 | 0.074468 | 0.006102 | -0.117136 | -0.065659 | 0.034885 | 0.022581 | 0.087036 | 0.030164 | 0.021119 | -0.013977 | 0.101083 | 0.098080 | 0.040811 | 0.111069 | 0.178879 | 0.035568 | 0.055580 | 0.094992 | 0.253205 | -0.011990 | 0.284408 | 0.001034 | 0.098783 | -0.015558 | 0.134339 | -0.319233 | -0.053968 | -0.017399 | -0.023382 | 0.017595 | -0.008656 | 0.002351 | 0.004589 | 0.028538 | 0.093476 | 0.205996 | 0.001890 | -0.018167 | -0.004829 | 0.041285 | -0.028958 | 0.013584 | -0.177818 | -0.073017 | -0.010263 | -0.015005 | 0.008687 | -0.006635 | -0.294441 | -0.078447 | -0.121560 | 0.004206 | -0.025833 | -0.128899 | -0.139254 | 0.119757 | -0.041735 | -0.175436 | -0.172980 | -0.032613 | -0.180382 | 0.037006 |
| specificity | 0.029533 | 0.029520 | 0.002428 | -0.007800 | 0.054347 | -0.084609 | -0.089509 | -0.021387 | 0.108872 | 1.000000 | -0.038286 | 0.013099 | 0.000715 | -0.077115 | 0.042615 | -0.067663 | 0.040043 | 0.028813 | -0.028427 | 0.049253 | 0.058724 | 0.119384 | 0.048390 | 0.045310 | -0.031270 | -0.017114 | -0.010113 | -0.019656 | -0.017081 | -0.043415 | -0.078823 | -0.023931 | -0.139092 | 0.069391 | -0.009817 | -0.029859 | -0.028731 | -0.010806 | 0.038776 | -0.009213 | 0.072283 | -0.001656 | 0.014417 | 0.055860 | -0.071928 | -0.018794 | 0.057615 | -0.089939 | 0.033731 | 0.045127 | 0.108759 | 0.157028 | 0.319712 | 0.202116 | 0.026006 | -0.002262 | 0.027169 | -0.023087 | -0.004741 | 0.036543 | 0.023172 | 0.042295 | -0.005309 | 0.020546 | -0.000961 | -0.005192 | -0.023228 | -0.003264 | -0.001160 | -0.016459 | 0.000937 | -0.063543 | -0.055242 | 0.030799 | -0.031348 | 0.079861 | 0.079318 | -0.022455 | 0.066226 | -0.084506 |
| vicinity | 0.077430 | 0.077450 | -0.007522 | -0.006319 | 0.017177 | -0.016601 | 0.075372 | 0.009589 | 0.061830 | -0.038286 | 1.000000 | 0.003777 | -0.000708 | -0.049932 | 0.034685 | -0.047956 | -0.010752 | 0.002230 | 0.008907 | 0.003429 | 0.004126 | -0.099688 | 0.028187 | 0.034531 | 0.008138 | 0.008148 | 0.015713 | 0.007248 | 0.009924 | 0.001864 | -0.033637 | 0.036175 | -0.028617 | -0.162214 | 0.034319 | 0.009848 | 0.102272 | -0.011768 | 0.016431 | -0.008969 | 0.027086 | -0.014499 | 0.032258 | 0.001554 | -0.174236 | -0.020791 | -0.002007 | -0.015398 | 0.008465 | 0.001927 | -0.056377 | -0.030279 | 0.001086 | 0.157410 | 0.016358 | -0.001038 | 0.001699 | -0.001243 | -0.001062 | 0.001131 | -0.028184 | 0.019185 | -0.002421 | 0.004230 | -0.000417 | -0.037674 | -0.039454 | 0.001488 | -0.064515 | 0.002251 | -0.028727 | -0.035756 | -0.031980 | 0.034029 | -0.012263 | 0.003202 | 0.002500 | -0.011080 | -0.002772 | -0.013761 |
| crit1 | 0.000168 | 0.000140 | 0.001693 | 0.011041 | -0.016506 | -0.003257 | 0.018375 | 0.019179 | -0.005409 | 0.013099 | 0.003777 | 1.000000 | -0.009326 | -0.039575 | -0.059548 | -0.303340 | 0.028852 | -0.009134 | 0.017525 | 0.026369 | -0.005979 | -0.052006 | -0.049232 | -0.044915 | -0.005581 | -0.011470 | -0.013061 | -0.009095 | -0.046491 | -0.050018 | -0.014507 | 0.029881 | 0.016858 | NaN | 0.022021 | 0.032245 | NaN | -0.003517 | -0.007606 | 0.003542 | -0.001060 | 0.010062 | NaN | NaN | NaN | -0.022175 | 0.029006 | 0.080171 | -0.044347 | -0.027395 | -0.084488 | -0.091579 | NaN | NaN | 0.010241 | 0.000114 | 0.007394 | 0.010642 | -0.004274 | 0.004257 | -0.004276 | 0.002559 | 0.001178 | -0.017463 | 0.008070 | 0.014340 | -0.022330 | -0.018802 | 0.022699 | 0.018921 | 0.018996 | 0.004353 | -0.091254 | 0.004447 | 0.004999 | 0.087052 | 0.086884 | 0.018515 | 0.078969 | 0.078870 |
| crit2 | 0.024546 | 0.024544 | 0.001159 | -0.004006 | 0.000896 | -0.040363 | -0.015700 | -0.005304 | -0.008859 | 0.000715 | -0.000708 | -0.009326 | 1.000000 | -0.031249 | -0.053470 | -0.540929 | 0.016103 | -0.011535 | 0.005613 | 0.003940 | 0.036633 | 0.030806 | -0.107987 | -0.115986 | -0.021346 | -0.027517 | -0.035334 | -0.013144 | -0.035282 | -0.044966 | -0.011017 | -0.015064 | -0.031669 | -0.111533 | -0.003017 | -0.043977 | 0.047314 | -0.003058 | 0.019483 | 0.006186 | -0.011346 | 0.007194 | -0.075566 | 0.074908 | NaN | -0.031557 | -0.011272 | 0.041038 | -0.020397 | -0.019393 | -0.025593 | 0.028285 | NaN | NaN | -0.019597 | 0.000426 | -0.006555 | -0.003552 | 0.000798 | -0.004359 | -0.003320 | 0.004619 | 0.000621 | 0.002831 | 0.002222 | 0.009249 | 0.001691 | 0.003642 | -0.005447 | 0.003016 | NaN | NaN | NaN | -0.026565 | 0.022271 | -0.027124 | -0.027153 | -0.013349 | -0.031262 | 0.045892 |
| crit3 | 0.008004 | 0.008009 | 0.000266 | -0.002291 | 0.046728 | -0.044322 | 0.012154 | -0.004557 | 0.030443 | -0.077115 | -0.049932 | -0.039575 | -0.031249 | 1.000000 | -0.226912 | 0.739957 | 0.056388 | -0.032080 | -0.008016 | 0.047378 | 0.176784 | -0.024633 | 0.235869 | 0.185802 | -0.082148 | 0.147569 | 0.136439 | -0.042145 | 0.030516 | 0.013252 | -0.004937 | -0.059726 | -0.095221 | -0.073813 | 0.058317 | 0.162839 | 0.105692 | 0.014191 | -0.035325 | -0.036385 | -0.016440 | -0.013686 | 0.048715 | 0.090295 | -0.092009 | -0.066242 | 0.040741 | 0.173396 | 0.157582 | 0.226294 | 0.165484 | 0.210654 | 0.170994 | 0.123553 | -0.057187 | -0.001147 | -0.077550 | 0.010291 | -0.002894 | -0.051963 | 0.006517 | -0.236984 | 0.003700 | 0.042533 | 0.000436 | -0.011756 | 0.028139 | -0.011841 | -0.040872 | 0.011447 | 0.007025 | 0.011612 | 0.007773 | -0.014695 | 0.034898 | -0.106573 | -0.108488 | -0.039076 | -0.102216 | 0.081730 |
| doubtterr | 0.278633 | 0.278671 | -0.012201 | -0.001802 | 0.008817 | 0.043077 | 0.071668 | 0.067820 | 0.108898 | 0.042615 | 0.034685 | -0.059548 | -0.053470 | -0.226912 | 1.000000 | -0.013527 | 0.046117 | -0.017044 | 0.053938 | -0.086716 | -0.144816 | 0.080444 | 0.007041 | 0.011418 | 0.040545 | -0.032671 | -0.021859 | 0.009594 | -0.085934 | -0.164225 | 0.029566 | 0.127896 | 0.100612 | 0.044902 | 0.071720 | -0.029036 | -0.022585 | -0.161389 | 0.001835 | -0.002060 | 0.019261 | 0.014129 | -0.012369 | -0.089146 | 0.172961 | -0.041462 | -0.151639 | 0.004867 | -0.078502 | -0.099443 | -0.056007 | -0.064521 | -0.107028 | -0.107455 | 0.044889 | -0.000477 | 0.033645 | 0.032348 | -0.002330 | 0.021962 | -0.114088 | 0.006783 | 0.000006 | -0.034154 | 0.013113 | -0.028729 | -0.165866 | -0.101788 | -0.059695 | 0.013378 | -0.026711 | -0.174019 | -0.344508 | 0.175146 | -0.159293 | 0.226361 | 0.227273 | 0.024566 | 0.160755 | 0.119270 |
| alternative | 0.063645 | 0.063702 | -0.018943 | -0.004179 | 0.090376 | 0.054848 | 0.066021 | 0.034444 | 0.063357 | -0.067663 | -0.047956 | -0.303340 | -0.540929 | 0.739957 | -0.013527 | 1.000000 | 0.012323 | -0.006387 | -0.044468 | 0.038666 | 0.200516 | 0.102229 | 0.663002 | 0.622644 | 0.005311 | 0.364549 | 0.374790 | -0.004099 | 0.122672 | 0.126293 | 0.164429 | 0.025992 | 0.002119 | 0.215992 | 0.055285 | 0.152997 | -0.183591 | 0.029045 | -0.089070 | -0.053479 | -0.006787 | -0.040721 | 0.125120 | -0.119474 | 0.266711 | -0.036115 | 0.036519 | 0.066719 | 0.221905 | 0.253805 | 0.132587 | 0.189827 | NaN | NaN | -0.023963 | -0.010082 | -0.051241 | 0.031702 | -0.003768 | -0.030390 | -0.024681 | -0.234248 | -0.007999 | 0.060922 | -0.017075 | -0.009922 | -0.028058 | -0.029148 | -0.104551 | 0.052100 | 0.047332 | 0.042566 | 0.054793 | 0.007434 | 0.010615 | -0.179344 | -0.180215 | -0.040265 | -0.158324 | -0.051231 |
| multiple | 0.091466 | 0.091481 | -0.003890 | -0.003096 | -0.020751 | -0.026759 | -0.000797 | -0.026256 | -0.009770 | 0.040043 | -0.010752 | 0.028852 | 0.016103 | 0.056388 | 0.046117 | 0.012323 | 1.000000 | 0.030175 | 0.021614 | 0.075634 | 0.147922 | 0.127878 | 0.081633 | 0.080727 | -0.019372 | 0.032571 | 0.050239 | -0.003459 | -0.048428 | -0.006385 | -0.054100 | 0.153984 | 0.029740 | 0.147596 | 0.029262 | 0.004880 | -0.022006 | 0.024735 | -0.017832 | 0.043731 | -0.044885 | -0.093515 | -0.082531 | 0.062069 | -0.022895 | 0.032108 | 0.022981 | 0.147349 | 0.055824 | 0.036935 | 0.120779 | 0.204377 | NaN | NaN | -0.006079 | 0.011093 | 0.009983 | 0.007578 | -0.003726 | 0.003995 | -0.019647 | -0.094793 | -0.006405 | -0.048177 | -0.009945 | -0.015355 | -0.076560 | -0.094735 | 0.011152 | -0.003295 | 0.018828 | -0.022776 | -0.023865 | 0.116238 | -0.114883 | 0.082953 | 0.081887 | -0.028053 | 0.048626 | 0.115780 |
| success | -0.049866 | -0.049852 | -0.005410 | -0.005132 | 0.065440 | -0.055631 | -0.020784 | -0.066895 | -0.032825 | 0.028813 | 0.002230 | -0.009134 | -0.011535 | -0.032080 | -0.017044 | -0.006387 | 0.030175 | 1.000000 | -0.006434 | 0.066561 | 0.059887 | 0.104275 | -0.030815 | 0.036035 | -0.022026 | 0.046694 | 0.034705 | -0.025810 | 0.039460 | 0.041297 | -0.081567 | 0.014561 | 0.005358 | 0.162863 | 0.014203 | 0.017967 | -0.062455 | 0.009513 | 0.010650 | -0.005745 | 0.015962 | 0.014767 | -0.148153 | -0.120669 | -0.182044 | 0.014095 | 0.012630 | -0.073039 | 0.051292 | 0.053878 | 0.077341 | 0.083046 | -0.040285 | 0.104743 | 0.056233 | 0.002938 | 0.003940 | 0.036288 | 0.004013 | -0.000948 | -0.035800 | 0.035571 | 0.002589 | 0.041714 | 0.019527 | 0.002748 | 0.009837 | -0.005610 | -0.024352 | 0.016280 | 0.004046 | 0.006693 | 0.004476 | 0.016109 | -0.032208 | 0.059611 | 0.060016 | -0.017657 | 0.035563 | -0.032827 |
| suicide | 0.134558 | 0.134543 | 0.007523 | 0.000833 | -0.033063 | -0.050038 | 0.100482 | 0.067662 | 0.074468 | -0.028427 | 0.008907 | 0.017525 | 0.005613 | -0.008016 | 0.053938 | -0.044468 | 0.021614 | -0.006434 | 1.000000 | -0.023721 | -0.182289 | -0.371633 | -0.029985 | -0.029194 | -0.004592 | 0.064950 | 0.058674 | -0.046214 | 0.009818 | -0.016933 | 0.006150 | 0.123739 | 0.100696 | 0.170012 | 0.007541 | -0.046951 | 0.040943 | 0.046471 | 0.025988 | 0.016142 | 0.023386 | 0.120798 | 0.064219 | 0.144746 | -0.111736 | -0.006484 | -0.033066 | 0.090131 | -0.052084 | -0.075490 | -0.262040 | -0.328965 | -0.199863 | -0.205059 | 0.128684 | 0.024739 | 0.076607 | 0.144817 | 0.004953 | 0.006940 | -0.069593 | -0.006937 | 0.000912 | -0.021783 | 0.009546 | 0.028492 | -0.024855 | -0.018526 | -0.030694 | -0.003016 | NaN | NaN | NaN | 0.030142 | 0.005994 | -0.000401 | 0.001115 | 0.000310 | -0.004842 | 0.160291 |
| attacktype1 | 0.048222 | 0.048197 | 0.009717 | -0.004886 | 0.268167 | -0.020701 | -0.004438 | 0.002602 | 0.006102 | 0.049253 | 0.003429 | 0.026369 | 0.003940 | 0.047378 | -0.086716 | 0.038666 | 0.075634 | 0.066561 | -0.023721 | 1.000000 | -0.349480 | -0.128349 | 0.012095 | 0.014070 | 0.022989 | -0.015456 | 0.011920 | 0.037567 | 0.163660 | 0.210966 | -0.003206 | 0.091261 | 0.000375 | 0.222508 | 0.021143 | -0.123075 | -0.154184 | 0.023535 | -0.068530 | 0.016272 | -0.008032 | -0.059518 | -0.042249 | 0.050096 | -0.038157 | 0.104117 | 0.635562 | 0.346553 | 0.259289 | 0.210417 | 0.097483 | 0.068918 | 0.075942 | 0.032072 | -0.006466 | 0.001392 | 0.024695 | 0.001256 | 0.007442 | 0.021275 | 0.030083 | -0.038341 | 0.000182 | 0.203643 | -0.009077 | 0.031370 | -0.044504 | 0.049133 | -0.083135 | -0.008845 | -0.028868 | 0.012730 | 0.020887 | -0.003855 | -0.047535 | 0.038970 | 0.039385 | 0.013573 | 0.055426 | -0.096994 |
| attacktype2 | 0.030693 | 0.030941 | -0.041601 | 0.012287 | 0.006901 | 0.039805 | 0.103274 | -0.174193 | -0.117136 | 0.058724 | 0.004126 | -0.005979 | 0.036633 | 0.176784 | -0.144816 | 0.200516 | 0.147922 | 0.059887 | -0.182289 | -0.349480 | 1.000000 | -0.293678 | 0.183779 | 0.182043 | 0.018146 | 0.066092 | 0.060952 | -0.011270 | -0.021404 | 0.029226 | -0.145868 | 0.076569 | -0.215551 | -0.179799 | 0.008113 | 0.256262 | 0.745222 | 0.021186 | 0.006079 | -0.004801 | 0.061960 | -0.054759 | 0.132830 | 0.301344 | 0.041050 | -0.013561 | 0.038328 | -0.065636 | 0.550993 | 0.544632 | 0.523738 | 0.507777 | NaN | NaN | -0.016305 | -0.016709 | -0.042043 | -0.043402 | -0.012683 | -0.023409 | 0.173458 | -0.095705 | -0.016800 | -0.061719 | -0.022732 | -0.010944 | 0.039790 | -0.101793 | 0.041164 | -0.095920 | -0.086699 | -0.061284 | -0.094529 | 0.051984 | -0.103588 | 0.021847 | 0.018162 | -0.002880 | 0.015036 | -0.335019 |
| attacktype3 | 0.054855 | 0.055001 | -0.024191 | -0.144920 | -0.021069 | 0.091397 | 0.134865 | -0.211265 | -0.065659 | 0.119384 | -0.099688 | -0.052006 | 0.030806 | -0.024633 | 0.080444 | 0.102229 | 0.127878 | 0.104275 | -0.371633 | -0.128349 | -0.293678 | 1.000000 | 0.248086 | 0.248499 | 0.084265 | 0.167483 | 0.182765 | 0.107977 | -0.075101 | -0.172649 | -0.185267 | 0.036971 | -0.588656 | NaN | -0.058066 | 0.527046 | NaN | -0.035193 | 0.012965 | -0.079411 | -0.033673 | 0.125487 | NaN | NaN | NaN | -0.389212 | -0.040496 | -0.027865 | 0.175875 | 0.247412 | 0.166503 | 0.233761 | NaN | NaN | -0.068305 | -0.116119 | -0.206514 | -0.185556 | -0.092653 | -0.037692 | 0.199808 | -0.077737 | 0.057522 | -0.115943 | -0.103455 | -0.002640 | -0.126307 | -0.108734 | -0.007460 | 0.184620 | NaN | -0.514984 | NaN | 0.123005 | -0.069251 | 0.038360 | 0.030498 | -0.048854 | 0.048233 | 0.257285 |
| targtype1 | 0.068833 | 0.068837 | -0.001157 | -0.000268 | 0.007149 | -0.023511 | 0.029113 | -0.037395 | 0.034885 | 0.048390 | 0.028187 | -0.049232 | -0.107987 | 0.235869 | 0.007041 | 0.663002 | 0.081633 | -0.030815 | -0.029985 | 0.012095 | 0.183779 | 0.248086 | 1.000000 | 0.988108 | -0.039336 | 0.044115 | 0.066154 | 0.039459 | 0.165333 | 0.214894 | -0.001524 | 0.024520 | 0.030820 | -0.035982 | 0.017122 | 0.086819 | 0.006801 | -0.005149 | 0.034712 | -0.022242 | -0.015433 | -0.011450 | 0.133378 | -0.043734 | 0.186260 | 0.004264 | 0.023806 | 0.130471 | 0.176996 | 0.237582 | 0.271574 | 0.377811 | 0.428393 | 0.322794 | 0.015216 | 0.001812 | -0.032744 | 0.019337 | -0.008540 | -0.029575 | 0.001769 | -0.041387 | 0.001227 | 0.005485 | 0.007480 | -0.000129 | -0.059013 | -0.069611 | -0.037220 | -0.023941 | 0.009375 | -0.099305 | 0.008996 | 0.084794 | -0.043899 | -0.049931 | -0.053241 | -0.050825 | -0.052555 | 0.106886 |
| targsubtype1 | 0.047099 | 0.047106 | -0.002147 | -0.002307 | 0.013145 | -0.021324 | 0.022808 | -0.051064 | 0.022581 | 0.045310 | 0.034531 | -0.044915 | -0.115986 | 0.185802 | 0.011418 | 0.622644 | 0.080727 | 0.036035 | -0.029194 | 0.014070 | 0.182043 | 0.248499 | 0.988108 | 1.000000 | -0.027975 | 0.071852 | 0.095163 | 0.031445 | 0.201831 | 0.259938 | -0.020392 | 0.035721 | 0.038190 | 0.006899 | 0.017227 | 0.092803 | 0.019578 | 0.003420 | 0.037225 | -0.017946 | -0.010827 | -0.025166 | 0.097249 | -0.102734 | 0.149559 | 0.003589 | 0.027587 | 0.104680 | 0.169748 | 0.218614 | 0.250616 | 0.363614 | 0.446850 | 0.373297 | 0.019939 | 0.001602 | -0.029278 | 0.022530 | -0.008585 | -0.027563 | 0.007128 | -0.041586 | 0.001375 | 0.009265 | 0.004724 | 0.006628 | -0.043001 | -0.056933 | -0.033325 | -0.027989 | -0.008339 | -0.115490 | 0.048495 | 0.063791 | -0.032332 | -0.032829 | -0.035646 | -0.037745 | -0.038051 | 0.071305 |
| natlty1 | -0.023637 | -0.023609 | -0.009960 | 0.006993 | 0.011975 | 0.572763 | 0.143829 | 0.031810 | 0.087036 | -0.031270 | 0.008138 | -0.005581 | -0.021346 | -0.082148 | 0.040545 | 0.005311 | -0.019372 | -0.022026 | -0.004592 | 0.022989 | 0.018146 | 0.084265 | -0.039336 | -0.027975 | 1.000000 | -0.044697 | -0.067363 | 0.388320 | -0.076478 | -0.079974 | 0.321793 | 0.086045 | 0.110048 | 0.205465 | -0.008808 | 0.010560 | -0.123018 | -0.003013 | -0.058844 | -0.005640 | -0.075408 | 0.051781 | -0.024410 | 0.065461 | -0.195006 | 0.019261 | 0.000233 | -0.047155 | -0.038856 | -0.046020 | -0.008032 | -0.005100 | 0.250807 | 0.154244 | -0.000274 | 0.009335 | 0.001491 | -0.003532 | 0.013539 | -0.022997 | -0.000925 | -0.003524 | 0.009278 | -0.002329 | -0.000835 | -0.056288 | -0.016808 | 0.030716 | 0.020451 | -0.002072 | 0.036658 | -0.026875 | 0.059576 | -0.023236 | 0.016045 | 0.037240 | 0.048039 | 0.366017 | 0.155235 | -0.039283 |
| targtype2 | 0.096598 | 0.096492 | 0.028223 | 0.016416 | -0.028854 | -0.028416 | 0.068391 | 0.072788 | 0.030164 | -0.017114 | 0.008148 | -0.011470 | -0.027517 | 0.147569 | -0.032671 | 0.364549 | 0.032571 | 0.046694 | 0.064950 | -0.015456 | 0.066092 | 0.167483 | 0.044115 | 0.071852 | -0.044697 | 1.000000 | 0.978316 | -0.055889 | 0.230227 | 0.245973 | 0.010719 | 0.043144 | 0.095055 | 0.282626 | -0.040798 | 0.040280 | 0.229295 | 0.044554 | 0.023948 | 0.033778 | -0.027003 | 0.011604 | 0.012046 | -0.005475 | -0.476222 | 0.082303 | 0.007388 | 0.066337 | 0.084008 | 0.014256 | 0.062915 | 0.033054 | NaN | 1.000000 | -0.007089 | -0.027157 | -0.005432 | 0.035054 | -0.027930 | -0.014735 | -0.000774 | 0.011713 | -0.028064 | -0.041132 | -0.003820 | -0.023846 | -0.133346 | -0.091747 | -0.039248 | 0.057208 | 0.156398 | -0.058656 | 0.055053 | 0.070537 | -0.024379 | -0.079060 | -0.083701 | -0.081103 | -0.097963 | 0.073966 |
| targsubtype2 | 0.113583 | 0.113482 | 0.025504 | 0.020875 | -0.012712 | -0.026888 | 0.064815 | 0.074326 | 0.021119 | -0.010113 | 0.015713 | -0.013061 | -0.035334 | 0.136439 | -0.021859 | 0.374790 | 0.050239 | 0.034705 | 0.058674 | 0.011920 | 0.060952 | 0.182765 | 0.066154 | 0.095163 | -0.067363 | 0.978316 | 1.000000 | -0.038300 | 0.259385 | 0.295744 | -0.009926 | 0.068712 | 0.126663 | 0.346946 | -0.039782 | 0.024983 | 0.193068 | 0.071081 | 0.024818 | 0.025471 | -0.020542 | 0.003440 | 0.034832 | 0.033458 | -0.407852 | 0.039602 | 0.018882 | 0.052401 | 0.104937 | 0.008880 | 0.035747 | -0.017816 | NaN | 1.000000 | -0.009597 | -0.034227 | 0.002061 | 0.032581 | -0.021414 | -0.010772 | -0.003682 | 0.016357 | -0.024501 | -0.024770 | -0.023613 | -0.021009 | -0.105079 | -0.069826 | -0.059998 | 0.045949 | 0.169222 | -0.059868 | 0.078618 | 0.077325 | -0.047155 | -0.082476 | -0.086455 | -0.087315 | -0.105167 | 0.049974 |
| natlty2 | -0.104678 | -0.104635 | -0.006758 | -0.025942 | 0.041500 | 0.484330 | 0.118185 | -0.151581 | -0.013977 | -0.019656 | 0.007248 | -0.009095 | -0.013144 | -0.042145 | 0.009594 | -0.004099 | -0.003459 | -0.025810 | -0.046214 | 0.037567 | -0.011270 | 0.107977 | 0.039459 | 0.031445 | 0.388320 | -0.055889 | -0.038300 | 1.000000 | -0.058904 | -0.043137 | 0.293686 | 0.095391 | 0.092825 | 0.027298 | 0.008060 | -0.123111 | 0.148688 | -0.016099 | -0.030554 | -0.021387 | -0.072079 | 0.065366 | 0.054786 | 0.022039 | 0.124060 | -0.071795 | 0.005726 | -0.050857 | -0.059913 | -0.068653 | 0.068442 | -0.016056 | NaN | 1.000000 | 0.041266 | 0.012830 | 0.007165 | 0.015756 | 0.038051 | -0.031553 | 0.000096 | 0.016268 | 0.010718 | 0.056172 | 0.180125 | -0.122464 | 0.091881 | 0.027275 | 0.072456 | 0.010577 | 0.206126 | -0.098631 | 0.028187 | -0.002226 | 0.190987 | 0.016864 | 0.028535 | 0.259955 | 0.123931 | -0.046021 |
| targtype3 | 0.149229 | 0.149068 | 0.039036 | -0.054502 | 0.060268 | -0.017009 | 0.122288 | 0.007107 | 0.101083 | -0.017081 | 0.009924 | -0.046491 | -0.035282 | 0.030516 | -0.085934 | 0.122672 | -0.048428 | 0.039460 | 0.009818 | 0.163660 | -0.021404 | -0.075101 | 0.165333 | 0.201831 | -0.076478 | 0.230227 | 0.259385 | -0.058904 | 1.000000 | 0.977296 | -0.017319 | 0.131476 | 0.144800 | -1.000000 | -0.031716 | 0.012931 | NaN | 0.150810 | -0.032176 | 0.047450 | 0.027535 | 0.032111 | 0.164530 | -1.000000 | NaN | 0.193276 | 0.122788 | -0.024191 | 0.096917 | 0.006922 | -0.201033 | -0.126127 | NaN | NaN | -0.023734 | -0.037223 | 0.003305 | 0.013806 | -0.023541 | -0.011480 | 0.005333 | 0.042694 | 0.080479 | 0.049714 | -0.079211 | 0.062794 | -0.062307 | -0.132249 | 0.029520 | -0.023638 | 0.110811 | -0.318670 | 0.206612 | 0.005734 | -0.135547 | -0.077724 | -0.076460 | -0.030702 | -0.100342 | -0.058701 |
| targsubtype3 | 0.081981 | 0.081870 | 0.027673 | -0.039834 | 0.061809 | -0.015717 | 0.074671 | -0.019372 | 0.098080 | -0.043415 | 0.001864 | -0.050018 | -0.044966 | 0.013252 | -0.164225 | 0.126293 | -0.006385 | 0.041297 | -0.016933 | 0.210966 | 0.029226 | -0.172649 | 0.214894 | 0.259938 | -0.079974 | 0.245973 | 0.295744 | -0.043137 | 0.977296 | 1.000000 | -0.018881 | 0.106529 | 0.111665 | -1.000000 | -0.045728 | -0.030178 | NaN | 0.224409 | -0.041138 | 0.025942 | 0.030654 | -0.007544 | 0.262663 | -1.000000 | NaN | 0.162470 | 0.150608 | -0.003814 | 0.161921 | 0.039024 | -0.165151 | -0.081339 | NaN | NaN | -0.020584 | -0.027356 | -0.007027 | 0.008298 | -0.007602 | -0.020827 | 0.023997 | 0.021358 | 0.106142 | 0.063799 | -0.077613 | 0.027765 | -0.125548 | -0.053020 | 0.032671 | -0.086248 | -0.084441 | -0.346607 | -0.015329 | -0.028977 | -0.112903 | -0.086118 | -0.083376 | -0.010270 | -0.098619 | -0.087561 |
| natlty3 | 0.004898 | 0.004864 | 0.008852 | -0.050251 | 0.015257 | 0.412045 | 0.139252 | -0.116506 | 0.040811 | -0.078823 | -0.033637 | -0.014507 | -0.011017 | -0.004937 | 0.029566 | 0.164429 | -0.054100 | -0.081567 | 0.006150 | -0.003206 | -0.145868 | -0.185267 | -0.001524 | -0.020392 | 0.321793 | 0.010719 | -0.009926 | 0.293686 | -0.017319 | -0.018881 | 1.000000 | 0.080901 | 0.369071 | 1.000000 | -0.020982 | -0.056511 | NaN | -0.055643 | 0.050581 | -0.008463 | -0.063708 | 0.191115 | -0.338120 | 1.000000 | NaN | 0.066966 | -0.014472 | -0.032425 | -0.080330 | -0.054684 | -0.062575 | -0.128383 | NaN | NaN | 0.034671 | 0.026303 | 0.016328 | 0.039957 | 0.007361 | -0.053740 | 0.016726 | -0.103444 | 0.253977 | 0.027688 | 0.042047 | 0.061611 | 0.039921 | -0.001498 | 0.045388 | 0.127413 | 0.252067 | -0.056576 | 0.189192 | -0.045297 | 0.177521 | 0.015443 | 0.029293 | 0.232052 | 0.124770 | -0.007143 |
| ingroup | 0.320870 | 0.320863 | 0.005227 | 0.004741 | 0.096260 | 0.043812 | 0.232674 | 0.042011 | 0.111069 | -0.023931 | 0.036175 | 0.029881 | -0.015064 | -0.059726 | 0.127896 | 0.025992 | 0.153984 | 0.014561 | 0.123739 | 0.091261 | 0.076569 | 0.036971 | 0.024520 | 0.035721 | 0.086045 | 0.043144 | 0.068712 | 0.095391 | 0.131476 | 0.106529 | 0.080901 | 1.000000 | 0.478171 | 0.349947 | 0.185118 | -0.091973 | -0.075026 | -0.018354 | 0.036894 | 0.141366 | -0.053082 | 0.035752 | -0.002050 | -0.209335 | -0.064626 | 0.340859 | 0.066514 | 0.024485 | 0.065721 | -0.005890 | 0.037569 | 0.055756 | -0.104627 | 0.044352 | 0.078688 | 0.004772 | 0.075082 | 0.039895 | 0.005872 | 0.024914 | -0.121825 | -0.023552 | -0.004267 | 0.025821 | 0.016568 | 0.000275 | -0.228559 | -0.031172 | -0.112264 | 0.039506 | 0.104314 | -0.078637 | -0.065762 | 0.083488 | -0.035787 | 0.222771 | 0.224276 | -0.004328 | 0.184116 | -0.020158 |
| ingroup2 | 0.467095 | 0.466974 | 0.037771 | 0.027022 | 0.035453 | 0.182534 | 0.464819 | 0.189383 | 0.178879 | -0.139092 | -0.028617 | 0.016858 | -0.031669 | -0.095221 | 0.100612 | 0.002119 | 0.029740 | 0.005358 | 0.100696 | 0.000375 | -0.215551 | -0.588656 | 0.030820 | 0.038190 | 0.110048 | 0.095055 | 0.126663 | 0.092825 | 0.144800 | 0.111665 | 0.369071 | 0.478171 | 1.000000 | 0.331314 | -0.139132 | -0.169974 | -0.293437 | -0.149174 | 0.135209 | 0.100744 | -0.001291 | 0.076086 | -0.012635 | -0.265547 | -0.059992 | 0.265002 | -0.029868 | 0.019202 | -0.015308 | -0.065153 | 0.111139 | 0.208587 | -0.139345 | -0.139345 | 0.058089 | -0.032034 | 0.073937 | -0.035092 | -0.047597 | -0.002113 | -0.123882 | -0.042810 | -0.085256 | 0.047862 | 0.081962 | 0.020704 | -0.435057 | 0.172821 | -0.153966 | 0.164900 | 0.156901 | 0.235952 | NaN | 0.022582 | 0.102421 | -0.027741 | -0.030374 | -0.047323 | -0.032209 | 0.055303 |
| ingroup3 | 0.492234 | 0.491812 | 0.035673 | 0.023289 | 0.105548 | 0.223098 | 0.391049 | 0.117800 | 0.035568 | 0.069391 | -0.162214 | NaN | -0.111533 | -0.073813 | 0.044902 | 0.215992 | 0.147596 | 0.162863 | 0.170012 | 0.222508 | -0.179799 | NaN | -0.035982 | 0.006899 | 0.205465 | 0.282626 | 0.346946 | 0.027298 | -1.000000 | -1.000000 | 1.000000 | 0.349947 | 0.331314 | 1.000000 | -0.279272 | -0.188191 | -0.194851 | -0.102160 | 0.223593 | 0.088147 | -0.083699 | -0.167251 | -0.107466 | -0.111752 | -0.103570 | -0.002594 | 0.161565 | 0.088244 | -0.329961 | -0.172448 | 0.497717 | 0.263105 | NaN | NaN | 0.104304 | -0.000120 | 0.163677 | -0.055315 | -0.089408 | 0.010265 | -0.037520 | -0.117844 | NaN | 0.170606 | -0.183859 | 0.135660 | -0.403404 | -0.384977 | -0.532924 | NaN | NaN | NaN | NaN | -0.097317 | -0.254746 | -0.019648 | -0.173232 | 0.036173 | -0.187605 | -0.049805 |
| guncertain1 | 0.079657 | 0.079675 | -0.006712 | -0.001641 | 0.039100 | -0.016782 | -0.007518 | -0.061125 | 0.055580 | -0.009817 | 0.034319 | 0.022021 | -0.003017 | 0.058317 | 0.071720 | 0.055285 | 0.029262 | 0.014203 | 0.007541 | 0.021143 | 0.008113 | -0.058066 | 0.017122 | 0.017227 | -0.008808 | -0.040798 | -0.039782 | 0.008060 | -0.031716 | -0.045728 | -0.020982 | 0.185118 | -0.139132 | -0.279272 | 1.000000 | 0.800062 | 0.735188 | -0.007412 | -0.016562 | -0.031043 | 0.037644 | -0.087926 | -0.005787 | 0.079995 | 0.038898 | 0.034435 | 0.012259 | 0.017803 | 0.033440 | 0.051013 | 0.045309 | 0.049731 | -0.125784 | 0.014141 | 0.005297 | -0.002595 | -0.018185 | 0.016567 | -0.001954 | -0.011662 | -0.042845 | 0.027472 | -0.002859 | 0.016769 | -0.001036 | -0.001729 | -0.144030 | -0.063392 | -0.154711 | -0.013500 | -0.035661 | -0.052783 | -0.040881 | 0.086771 | -0.054215 | 0.257119 | 0.257382 | -0.007005 | 0.223806 | -0.002948 |
| guncertain2 | -0.056744 | -0.056589 | -0.045888 | 0.011782 | -0.077274 | -0.017398 | -0.080812 | -0.057626 | 0.094992 | -0.029859 | 0.009848 | 0.032245 | -0.043977 | 0.162839 | -0.029036 | 0.152997 | 0.004880 | 0.017967 | -0.046951 | -0.123075 | 0.256262 | 0.527046 | 0.086819 | 0.092803 | 0.010560 | 0.040280 | 0.024983 | -0.123111 | 0.012931 | -0.030178 | -0.056511 | -0.091973 | -0.169974 | -0.188191 | 0.800062 | 1.000000 | 0.756098 | -0.027706 | -0.032406 | -0.136141 | -0.009632 | -0.080729 | -0.056263 | 0.155397 | 0.049494 | -0.131084 | -0.126414 | 0.047616 | 0.015739 | 0.074793 | 0.081763 | 0.227394 | NaN | NaN | -0.041901 | 0.034905 | -0.086811 | 0.070555 | 0.043672 | -0.079523 | 0.032791 | 0.032339 | -0.045622 | -0.022257 | -0.067089 | 0.070129 | 0.230507 | -0.072873 | 0.037366 | -0.176649 | -0.184637 | 0.341210 | NaN | -0.107781 | -0.077857 | 0.006106 | 0.047856 | -0.033818 | 0.033380 | 0.107528 |
| guncertain3 | -0.137790 | -0.137356 | -0.084985 | -0.118670 | -0.169880 | -0.282162 | -0.160004 | 0.080799 | 0.253205 | -0.028731 | 0.102272 | NaN | 0.047314 | 0.105692 | -0.022585 | -0.183591 | -0.022006 | -0.062455 | 0.040943 | -0.154184 | 0.745222 | NaN | 0.006801 | 0.019578 | -0.123018 | 0.229295 | 0.193068 | 0.148688 | NaN | NaN | NaN | -0.075026 | -0.293437 | -0.194851 | 0.735188 | 0.756098 | 1.000000 | 0.064386 | 0.181871 | -0.208799 | 0.144130 | 0.049369 | 0.101229 | 0.088615 | 0.159528 | 0.033739 | -0.145878 | -0.102162 | -0.076098 | -0.005298 | -0.064875 | 0.184243 | NaN | NaN | -0.075485 | 0.022937 | -0.169288 | 0.083150 | -0.047167 | -0.055065 | 0.042250 | 0.317718 | NaN | -0.094421 | -0.093553 | 0.104639 | 0.612372 | NaN | 0.108893 | NaN | NaN | NaN | NaN | -0.143877 | -0.002750 | 0.282090 | 0.242215 | 0.067628 | 0.231277 | 0.081894 |
| nperps | -0.137350 | -0.137413 | 0.016581 | -0.015820 | -0.003213 | -0.002085 | -0.075079 | -0.082155 | -0.011990 | -0.010806 | -0.011768 | -0.003517 | -0.003058 | 0.014191 | -0.161389 | 0.029045 | 0.024735 | 0.009513 | 0.046471 | 0.023535 | 0.021186 | -0.035193 | -0.005149 | 0.003420 | -0.003013 | 0.044554 | 0.071081 | -0.016099 | 0.150810 | 0.224409 | -0.055643 | -0.018354 | -0.149174 | -0.102160 | -0.007412 | -0.027706 | 0.064386 | 1.000000 | 0.027360 | -0.031339 | -0.006220 | -0.062536 | 0.014869 | -0.074692 | 0.092978 | -0.361492 | 0.019260 | -0.185342 | 0.006899 | 0.030287 | -0.023918 | -0.023564 | 0.073432 | -0.006520 | 0.025289 | 0.009824 | 0.133172 | 0.030652 | 0.010237 | 0.070829 | 0.032552 | 0.036956 | 0.012670 | 0.008845 | 0.038268 | -0.003021 | 0.254488 | 0.043888 | 0.042772 | 0.020936 | -0.008042 | 0.121543 | 0.082137 | -0.120628 | 0.139419 | 0.028509 | 0.028253 | 0.004316 | 0.030257 | -0.072612 |
| nperpcap | 0.473824 | 0.473655 | 0.035928 | 0.005552 | 0.017236 | -0.069664 | 0.223525 | -0.059984 | 0.284408 | 0.038776 | 0.016431 | -0.007606 | 0.019483 | -0.035325 | 0.001835 | -0.089070 | -0.017832 | 0.010650 | 0.025988 | -0.068530 | 0.006079 | 0.012965 | 0.034712 | 0.037225 | -0.058844 | 0.023948 | 0.024818 | -0.030554 | -0.032176 | -0.041138 | 0.050581 | 0.036894 | 0.135209 | 0.223593 | -0.016562 | -0.032406 | 0.181871 | 0.027360 | 1.000000 | 0.010583 | 0.095807 | -0.054463 | 0.070638 | -0.141514 | -0.120593 | -0.145039 | -0.031826 | -0.082054 | -0.062002 | -0.018462 | -0.003537 | -0.020102 | -0.250000 | -0.274649 | 0.013548 | 0.000134 | 0.005724 | 0.014973 | -0.029006 | 0.008187 | 0.001222 | 0.031363 | 0.000167 | 0.009844 | 0.018266 | -0.000190 | 0.003760 | -0.000057 | -0.104247 | -0.012861 | 0.011468 | -0.027489 | 0.004295 | 0.000335 | 0.005645 | -0.002897 | -0.002522 | 0.044276 | 0.003724 | 0.011627 |
| claimed | 0.126256 | 0.126134 | 0.026994 | 0.003392 | 0.005034 | -0.012140 | -0.000064 | 0.030214 | 0.001034 | -0.009213 | -0.008969 | 0.003542 | 0.006186 | -0.036385 | -0.002060 | -0.053479 | 0.043731 | -0.005745 | 0.016142 | 0.016272 | -0.004801 | -0.079411 | -0.022242 | -0.017946 | -0.005640 | 0.033778 | 0.025471 | -0.021387 | 0.047450 | 0.025942 | -0.008463 | 0.141366 | 0.100744 | 0.088147 | -0.031043 | -0.136141 | -0.208799 | -0.031339 | 0.010583 | 1.000000 | -0.036765 | 0.340569 | -0.039660 | 0.067208 | 0.211447 | 0.359383 | 0.016443 | 0.016494 | -0.016587 | -0.038717 | -0.070318 | -0.098168 | -0.408248 | -0.434258 | 0.005799 | 0.004465 | 0.018184 | -0.002213 | 0.002739 | 0.013302 | 0.053385 | -0.055575 | 0.009868 | -0.003868 | 0.010535 | 0.048462 | 0.003536 | 0.075051 | 0.028058 | 0.035922 | 0.007314 | 0.004343 | -0.308770 | -0.076291 | 0.086461 | 0.123522 | 0.124145 | 0.014558 | 0.107060 | 0.001045 |
| claimmode | 0.115381 | 0.115327 | 0.024605 | 0.000449 | 0.053912 | -0.128221 | 0.153652 | -0.052990 | 0.098783 | 0.072283 | 0.027086 | -0.001060 | -0.011346 | -0.016440 | 0.019261 | -0.006787 | -0.044885 | 0.015962 | 0.023386 | -0.008032 | 0.061960 | -0.033673 | -0.015433 | -0.010827 | -0.075408 | -0.027003 | -0.020542 | -0.072079 | 0.027535 | 0.030654 | -0.063708 | -0.053082 | -0.001291 | -0.083699 | 0.037644 | -0.009632 | 0.144130 | -0.006220 | 0.095807 | -0.036765 | 1.000000 | -0.037657 | 0.613332 | 0.051544 | 0.531943 | 0.096103 | 0.039418 | -0.071736 | -0.017531 | -0.045139 | -0.048788 | -0.031712 | NaN | NaN | 0.008736 | -0.004948 | 0.021354 | -0.014883 | -0.016321 | 0.012812 | -0.053553 | 0.051160 | -0.022592 | 0.027224 | 0.035125 | -0.045991 | -0.011807 | -0.024617 | -0.069962 | -0.060852 | 0.185129 | 0.101824 | -0.096632 | 0.010944 | -0.011543 | -0.011405 | -0.012039 | 0.033224 | -0.006942 | -0.043560 |
| claim2 | 0.030646 | 0.031130 | -0.096113 | -0.042107 | -0.207015 | 0.033483 | 0.092754 | 0.098388 | -0.015558 | -0.001656 | -0.014499 | 0.010062 | 0.007194 | -0.013686 | 0.014129 | -0.040721 | -0.093515 | 0.014767 | 0.120798 | -0.059518 | -0.054759 | 0.125487 | -0.011450 | -0.025166 | 0.051781 | 0.011604 | 0.003440 | 0.065366 | 0.032111 | -0.007544 | 0.191115 | 0.035752 | 0.076086 | -0.167251 | -0.087926 | -0.080729 | 0.049369 | -0.062536 | -0.054463 | 0.340569 | -0.037657 | 1.000000 | 0.011037 | 0.453864 | 0.211447 | 0.130928 | 0.015925 | 0.084472 | 0.037232 | 0.058616 | -0.343863 | -0.354962 | NaN | NaN | -0.038518 | -0.066458 | 0.008077 | -0.013052 | -0.202700 | -0.009667 | 0.059927 | -0.114489 | 0.070038 | -0.077740 | -0.068688 | 0.302579 | -0.361799 | 0.015337 | -0.082299 | 0.042649 | 0.621921 | -0.091959 | NaN | 0.048072 | 0.040913 | 0.027318 | -0.042944 | 0.035443 | -0.021627 | 0.117717 |
| claimmode2 | 0.124254 | 0.124085 | 0.017931 | 0.035093 | 0.030452 | -0.082198 | 0.285420 | -0.153730 | 0.134339 | 0.014417 | 0.032258 | NaN | -0.075566 | 0.048715 | -0.012369 | 0.125120 | -0.082531 | -0.148153 | 0.064219 | -0.042249 | 0.132830 | NaN | 0.133378 | 0.097249 | -0.024410 | 0.012046 | 0.034832 | 0.054786 | 0.164530 | 0.262663 | -0.338120 | -0.002050 | -0.012635 | -0.107466 | -0.005787 | -0.056263 | 0.101229 | 0.014869 | 0.070638 | -0.039660 | 0.613332 | 0.011037 | 1.000000 | 0.086091 | 0.701110 | -0.022186 | 0.060883 | -0.002411 | -0.066019 | 0.128597 | 0.014244 | -0.065300 | NaN | NaN | -0.001471 | 0.026208 | -0.018671 | 0.122050 | -0.034568 | -0.014938 | 0.038599 | -0.016453 | 0.057268 | 0.096052 | 0.009408 | 0.090598 | -0.103252 | 0.160587 | -0.186263 | 0.336117 | NaN | 1.000000 | NaN | 0.086917 | -0.053700 | -0.073112 | -0.114261 | 0.031089 | -0.075177 | 0.179775 |
| claim3 | -0.417761 | -0.417771 | 0.029200 | 0.131652 | -0.057406 | 0.157317 | 0.057395 | 0.177016 | -0.319233 | 0.055860 | 0.001554 | NaN | 0.074908 | 0.090295 | -0.089146 | -0.119474 | 0.062069 | -0.120669 | 0.144746 | 0.050096 | 0.301344 | NaN | -0.043734 | -0.102734 | 0.065461 | -0.005475 | 0.033458 | 0.022039 | -1.000000 | -1.000000 | 1.000000 | -0.209335 | -0.265547 | -0.111752 | 0.079995 | 0.155397 | 0.088615 | -0.074692 | -0.141514 | 0.067208 | 0.051544 | 0.453864 | 0.086091 | 1.000000 | 0.328153 | -0.090762 | -0.022821 | -0.055974 | 0.219344 | 0.195711 | -0.508001 | -0.349513 | NaN | NaN | 0.022974 | 0.055290 | -0.020181 | 0.024403 | 0.085030 | -0.080619 | -0.025274 | -0.143638 | 0.218218 | -0.024859 | 0.268400 | 0.279925 | -0.408248 | -0.471666 | -0.040032 | NaN | NaN | NaN | NaN | 0.050594 | -0.150436 | 0.012608 | -0.164594 | 0.028146 | -0.118858 | 0.149810 |
| claimmode3 | 0.082421 | 0.082659 | -0.082247 | 0.043476 | -0.062390 | 0.103578 | -0.184638 | 0.009961 | -0.053968 | -0.071928 | -0.174236 | NaN | NaN | -0.092009 | 0.172961 | 0.266711 | -0.022895 | -0.182044 | -0.111736 | -0.038157 | 0.041050 | NaN | 0.186260 | 0.149559 | -0.195006 | -0.476222 | -0.407852 | 0.124060 | NaN | NaN | NaN | -0.064626 | -0.059992 | -0.103570 | 0.038898 | 0.049494 | 0.159528 | 0.092978 | -0.120593 | 0.211447 | 0.531943 | 0.211447 | 0.701110 | 0.328153 | 1.000000 | 0.207371 | 0.026199 | -0.001890 | 0.100411 | 0.289964 | NaN | -0.307148 | NaN | NaN | -0.209486 | -0.111287 | -0.036101 | -0.125854 | 0.055117 | NaN | 0.092586 | 0.257425 | 0.238305 | -0.021174 | 0.763863 | 0.790569 | NaN | NaN | 0.500244 | NaN | NaN | NaN | NaN | -0.694365 | 0.914652 | -0.014631 | -0.131805 | -0.299284 | -0.076082 | 0.135286 |
| compclaim | 0.272146 | 0.271551 | 0.133230 | 0.031835 | 0.061214 | 0.002878 | -0.066079 | -0.016673 | -0.017399 | -0.018794 | -0.020791 | -0.022175 | -0.031557 | -0.066242 | -0.041462 | -0.036115 | 0.032108 | 0.014095 | -0.006484 | 0.104117 | -0.013561 | -0.389212 | 0.004264 | 0.003589 | 0.019261 | 0.082303 | 0.039602 | -0.071795 | 0.193276 | 0.162470 | 0.066966 | 0.340859 | 0.265002 | -0.002594 | 0.034435 | -0.131084 | 0.033739 | -0.361492 | -0.145039 | 0.359383 | 0.096103 | 0.130928 | -0.022186 | -0.090762 | 0.207371 | 1.000000 | 0.135906 | 0.036618 | 0.036513 | -0.031887 | -0.112598 | -0.162605 | NaN | NaN | -0.008346 | -0.013213 | 0.064220 | -0.020635 | -0.003921 | 0.010518 | 0.116075 | 0.106430 | 0.065203 | 0.029763 | -0.042754 | 0.068736 | -0.173703 | 0.128789 | -0.119713 | -0.077179 | 0.039705 | -0.108367 | -0.079969 | -0.084546 | 0.089514 | 0.188011 | 0.193223 | 0.000661 | 0.172587 | -0.066698 |
| weaptype1 | -0.038496 | -0.038523 | 0.009847 | 0.001501 | 0.201390 | -0.021702 | 0.004494 | -0.022132 | -0.023382 | 0.057615 | -0.002007 | 0.029006 | -0.011272 | 0.040741 | -0.151639 | 0.036519 | 0.022981 | 0.012630 | -0.033066 | 0.635562 | 0.038328 | -0.040496 | 0.023806 | 0.027587 | 0.000233 | 0.007388 | 0.018882 | 0.005726 | 0.122788 | 0.150608 | -0.014472 | 0.066514 | -0.029868 | 0.161565 | 0.012259 | -0.126414 | -0.145878 | 0.019260 | -0.031826 | 0.016443 | 0.039418 | 0.015925 | 0.060883 | -0.022821 | 0.026199 | 0.135906 | 1.000000 | 0.764294 | 0.136071 | -0.039754 | 0.027873 | -0.080225 | 0.051026 | 0.134563 | -0.002685 | 0.008670 | 0.030630 | -0.022339 | -0.007001 | 0.022020 | 0.018415 | -0.009299 | -0.000687 | 0.170645 | 0.002104 | 0.023116 | -0.031667 | 0.004902 | -0.064859 | -0.010745 | -0.030813 | 0.068307 | 0.120271 | 0.015935 | -0.037182 | 0.035244 | 0.035285 | -0.010050 | 0.049276 | -0.169767 |
| weapsubtype1 | 0.100979 | 0.100967 | 0.004606 | 0.008442 | -0.114555 | -0.040641 | 0.093825 | 0.104991 | 0.017595 | -0.089939 | -0.015398 | 0.080171 | 0.041038 | 0.173396 | 0.004867 | 0.066719 | 0.147349 | -0.073039 | 0.090131 | 0.346553 | -0.065636 | -0.027865 | 0.130471 | 0.104680 | -0.047155 | 0.066337 | 0.052401 | -0.050857 | -0.024191 | -0.003814 | -0.032425 | 0.024485 | 0.019202 | 0.088244 | 0.017803 | 0.047616 | -0.102162 | -0.185342 | -0.082054 | 0.016494 | -0.071736 | 0.084472 | -0.002411 | -0.055974 | -0.001890 | 0.036618 | 0.764294 | 1.000000 | 0.000662 | -0.143789 | 0.018060 | -0.081560 | 0.015669 | 0.009337 | -0.073846 | 0.000250 | -0.037225 | 0.042654 | 0.003978 | -0.033573 | 0.034626 | -0.190115 | 0.004555 | -0.074860 | -0.003477 | -0.014526 | -0.217952 | -0.069186 | -0.006727 | -0.014986 | -0.028565 | -0.058699 | -0.011415 | 0.011093 | 0.027428 | -0.124174 | -0.123801 | -0.001089 | -0.114073 | 0.639508 |
| weaptype2 | 0.049107 | 0.049068 | 0.010822 | 0.021216 | 0.150400 | -0.008422 | 0.053868 | -0.031830 | -0.008656 | 0.033731 | 0.008465 | -0.044347 | -0.020397 | 0.157582 | -0.078502 | 0.221905 | 0.055824 | 0.051292 | -0.052084 | 0.259289 | 0.550993 | 0.175875 | 0.176996 | 0.169748 | -0.038856 | 0.084008 | 0.104937 | -0.059913 | 0.096917 | 0.161921 | -0.080330 | 0.065721 | -0.015308 | -0.329961 | 0.033440 | 0.015739 | -0.076098 | 0.006899 | -0.062002 | -0.016587 | -0.017531 | 0.037232 | -0.066019 | 0.219344 | 0.100411 | 0.036513 | 0.136071 | 0.000662 | 1.000000 | 0.903163 | 0.253090 | 0.275170 | 0.167487 | 0.272276 | 0.011464 | 0.009591 | -0.013158 | -0.070004 | -0.004068 | 0.008380 | 0.109194 | -0.056253 | 0.037600 | 0.079138 | -0.082155 | -0.005766 | -0.228262 | -0.075790 | -0.061492 | -0.196358 | -0.137716 | -0.218838 | 0.089119 | 0.084271 | -0.136887 | -0.061919 | -0.064585 | -0.025441 | -0.058558 | -0.243656 |
| weapsubtype2 | 0.029094 | 0.029045 | 0.013472 | -0.005620 | 0.138510 | -0.023695 | 0.048491 | -0.058287 | 0.002351 | 0.045127 | 0.001927 | -0.027395 | -0.019393 | 0.226294 | -0.099443 | 0.253805 | 0.036935 | 0.053878 | -0.075490 | 0.210417 | 0.544632 | 0.247412 | 0.237582 | 0.218614 | -0.046020 | 0.014256 | 0.008880 | -0.068653 | 0.006922 | 0.039024 | -0.054684 | -0.005890 | -0.065153 | -0.172448 | 0.051013 | 0.074793 | -0.005298 | 0.030287 | -0.018462 | -0.038717 | -0.045139 | 0.058616 | 0.128597 | 0.195711 | 0.289964 | -0.031887 | -0.039754 | -0.143789 | 0.903163 | 1.000000 | 0.192457 | 0.179036 | 0.072122 | 0.177456 | 0.018625 | 0.021832 | -0.031562 | -0.035976 | -0.006678 | -0.008233 | 0.128866 | -0.078993 | -0.004913 | 0.074541 | -0.038802 | 0.062505 | -0.303772 | -0.094137 | -0.030584 | -0.193138 | -0.095537 | -0.180625 | -0.340305 | -0.028129 | -0.062037 | -0.072355 | -0.073811 | 0.005799 | -0.060736 | -0.163070 |
| weaptype3 | 0.050598 | 0.050625 | -0.045108 | 0.036411 | 0.084213 | 0.018337 | 0.107404 | -0.098457 | 0.004589 | 0.108759 | -0.056377 | -0.084488 | -0.025593 | 0.165484 | -0.056007 | 0.132587 | 0.120779 | 0.077341 | -0.262040 | 0.097483 | 0.523738 | 0.166503 | 0.271574 | 0.250616 | -0.008032 | 0.062915 | 0.035747 | 0.068442 | -0.201033 | -0.165151 | -0.062575 | 0.037569 | 0.111139 | 0.497717 | 0.045309 | 0.081763 | -0.064875 | -0.023918 | -0.003537 | -0.070318 | -0.048788 | -0.343863 | 0.014244 | -0.508001 | NaN | -0.112598 | 0.027873 | 0.018060 | 0.253090 | 0.192457 | 1.000000 | 0.941126 | 0.254817 | 0.414652 | 0.056752 | 0.046113 | -0.118006 | -0.081756 | -0.021161 | -0.049650 | 0.125519 | -0.125583 | -0.046500 | -0.004733 | -0.172456 | 0.141311 | -0.180219 | -0.079119 | -0.171472 | -0.301823 | NaN | NaN | NaN | 0.042162 | -0.213369 | -0.046920 | -0.053467 | -0.044871 | -0.056121 | -0.211704 |
| weapsubtype3 | 0.083092 | 0.083471 | -0.128683 | -0.030031 | 0.101688 | 0.046826 | 0.143923 | -0.131871 | 0.028538 | 0.157028 | -0.030279 | -0.091579 | 0.028285 | 0.210654 | -0.064521 | 0.189827 | 0.204377 | 0.083046 | -0.328965 | 0.068918 | 0.507777 | 0.233761 | 0.377811 | 0.363614 | -0.005100 | 0.033054 | -0.017816 | -0.016056 | -0.126127 | -0.081339 | -0.128383 | 0.055756 | 0.208587 | 0.263105 | 0.049731 | 0.227394 | 0.184243 | -0.023564 | -0.020102 | -0.098168 | -0.031712 | -0.354962 | -0.065300 | -0.349513 | -0.307148 | -0.162605 | -0.080225 | -0.081560 | 0.275170 | 0.179036 | 0.941126 | 1.000000 | 0.447792 | 0.340049 | 0.060872 | 0.065182 | -0.132825 | -0.090776 | -0.020998 | -0.068162 | 0.140658 | -0.193161 | -0.058999 | -0.050961 | -0.081084 | 0.129332 | -0.274250 | -0.011079 | -0.031722 | -0.316735 | NaN | NaN | NaN | 0.036080 | -0.162824 | -0.066502 | -0.075466 | -0.063517 | -0.055507 | -0.256816 |
| weaptype4 | -0.136695 | -0.136413 | -0.059837 | -0.001784 | 0.117879 | 0.301899 | 0.051591 | -0.170134 | 0.093476 | 0.319712 | 0.001086 | NaN | NaN | 0.170994 | -0.107028 | NaN | NaN | -0.040285 | -0.199863 | 0.075942 | NaN | NaN | 0.428393 | 0.446850 | 0.250807 | NaN | NaN | NaN | NaN | NaN | NaN | -0.104627 | -0.139345 | NaN | -0.125784 | NaN | NaN | 0.073432 | -0.250000 | -0.408248 | NaN | NaN | NaN | NaN | NaN | NaN | 0.051026 | 0.015669 | 0.167487 | 0.072122 | 0.254817 | 0.447792 | 1.000000 | 0.837112 | 0.099483 | -0.200000 | -0.064649 | 0.062727 | NaN | 0.559017 | 0.150446 | 0.067111 | -0.262032 | -0.050379 | -0.372503 | -0.019672 | -0.268720 | 0.000000 | -0.044394 | NaN | NaN | NaN | NaN | -0.483896 | 0.259311 | -0.182583 | -0.199934 | -0.024523 | -0.080742 | -0.224095 |
| weapsubtype4 | 0.031511 | 0.031232 | 0.063582 | 0.082344 | 0.208251 | 0.294948 | 0.012752 | -0.142039 | 0.205996 | 0.202116 | 0.157410 | NaN | NaN | 0.123553 | -0.107455 | NaN | NaN | 0.104743 | -0.205059 | 0.032072 | NaN | NaN | 0.322794 | 0.373297 | 0.154244 | 1.000000 | 1.000000 | 1.000000 | NaN | NaN | NaN | 0.044352 | -0.139345 | NaN | 0.014141 | NaN | NaN | -0.006520 | -0.274649 | -0.434258 | NaN | NaN | NaN | NaN | NaN | NaN | 0.134563 | 0.009337 | 0.272276 | 0.177456 | 0.414652 | 0.340049 | 0.837112 | 1.000000 | 0.111635 | -0.247953 | -0.505800 | 0.145234 | NaN | -0.088288 | 0.127067 | 0.018435 | -0.400820 | 0.015220 | 0.004766 | 0.472953 | -0.280119 | 0.989554 | 0.165554 | 0.904194 | NaN | NaN | NaN | -0.519332 | 0.798374 | -0.292512 | -0.315711 | -0.078956 | -0.234329 | -0.258205 |
| nkill | 0.013383 | 0.013372 | 0.004155 | -0.004749 | 0.017696 | -0.016915 | 0.037647 | -0.023306 | 0.001890 | 0.026006 | 0.016358 | 0.010241 | -0.019597 | -0.057187 | 0.044889 | -0.023963 | -0.006079 | 0.056233 | 0.128684 | -0.006466 | -0.016305 | -0.068305 | 0.015216 | 0.019939 | -0.000274 | -0.007089 | -0.009597 | 0.041266 | -0.023734 | -0.020584 | 0.034671 | 0.078688 | 0.058089 | 0.104304 | 0.005297 | -0.041901 | -0.075485 | 0.025289 | 0.013548 | 0.005799 | 0.008736 | -0.038518 | -0.001471 | 0.022974 | -0.209486 | -0.008346 | -0.002685 | -0.073846 | 0.011464 | 0.018625 | 0.056752 | 0.060872 | 0.099483 | 0.111635 | 1.000000 | 0.546581 | 0.394787 | 0.270090 | 0.042583 | 0.139514 | -0.015299 | 0.022818 | 0.021531 | -0.005581 | 0.209368 | 0.089172 | -0.009629 | -0.038451 | -0.000330 | 0.072828 | 0.011212 | -0.019389 | -0.031223 | 0.052130 | 0.024171 | 0.056675 | 0.057400 | -0.016067 | 0.041136 | -0.048800 |
| nkillus | -0.013713 | -0.013735 | 0.004285 | -0.002144 | -0.001541 | 0.005565 | -0.015470 | 0.006760 | -0.018167 | -0.002262 | -0.001038 | 0.000114 | 0.000426 | -0.001147 | -0.000477 | -0.010082 | 0.011093 | 0.002938 | 0.024739 | 0.001392 | -0.016709 | -0.116119 | 0.001812 | 0.001602 | 0.009335 | -0.027157 | -0.034227 | 0.012830 | -0.037223 | -0.027356 | 0.026303 | 0.004772 | -0.032034 | -0.000120 | -0.002595 | 0.034905 | 0.022937 | 0.009824 | 0.000134 | 0.004465 | -0.004948 | -0.066458 | 0.026208 | 0.055290 | -0.111287 | -0.013213 | 0.008670 | 0.000250 | 0.009591 | 0.021832 | 0.046113 | 0.065182 | -0.200000 | -0.247953 | 0.546581 | 1.000000 | 0.006031 | 0.090724 | 0.417992 | -0.000363 | 0.004271 | -0.036667 | 0.482252 | 0.009009 | 0.020789 | 0.149791 | 0.055680 | 0.042002 | 0.006968 | 0.132575 | 0.587997 | -0.009771 | -0.005019 | -0.007804 | 0.010414 | 0.007321 | 0.008487 | 0.005080 | 0.010069 | -0.004405 |
| nkillter | 0.015116 | 0.015090 | 0.005767 | -0.004134 | 0.004419 | -0.008828 | 0.022470 | -0.015072 | -0.004829 | 0.027169 | 0.001699 | 0.007394 | -0.006555 | -0.077550 | 0.033645 | -0.051241 | 0.009983 | 0.003940 | 0.076607 | 0.024695 | -0.042043 | -0.206514 | -0.032744 | -0.029278 | 0.001491 | -0.005432 | 0.002061 | 0.007165 | 0.003305 | -0.007027 | 0.016328 | 0.075082 | 0.073937 | 0.163677 | -0.018185 | -0.086811 | -0.169288 | 0.133172 | 0.005724 | 0.018184 | 0.021354 | 0.008077 | -0.018671 | -0.020181 | -0.036101 | 0.064220 | 0.030630 | -0.037225 | -0.013158 | -0.031562 | -0.118006 | -0.132825 | -0.064649 | -0.505800 | 0.394787 | 0.006031 | 1.000000 | 0.084275 | 0.001034 | 0.670075 | -0.025451 | 0.031023 | 0.005118 | -0.018776 | 0.078872 | -0.008388 | 0.035709 | -0.010761 | 0.023501 | -0.010004 | 0.013775 | -0.009871 | -0.006406 | 0.018045 | 0.024787 | 0.068638 | 0.069164 | -0.000300 | 0.060943 | -0.045060 |
| nwound | 0.031025 | 0.031020 | 0.002004 | 0.000517 | -0.012349 | -0.009452 | 0.045948 | 0.020930 | 0.041285 | -0.023087 | -0.001243 | 0.010642 | -0.003552 | 0.010291 | 0.032348 | 0.031702 | 0.007578 | 0.036288 | 0.144817 | 0.001256 | -0.043402 | -0.185556 | 0.019337 | 0.022530 | -0.003532 | 0.035054 | 0.032581 | 0.015756 | 0.013806 | 0.008298 | 0.039957 | 0.039895 | -0.035092 | -0.055315 | 0.016567 | 0.070555 | 0.083150 | 0.030652 | 0.014973 | -0.002213 | -0.014883 | -0.013052 | 0.122050 | 0.024403 | -0.125854 | -0.020635 | -0.022339 | 0.042654 | -0.070004 | -0.035976 | -0.081756 | -0.090776 | 0.062727 | 0.145234 | 0.270090 | 0.090724 | 0.084275 | 1.000000 | 0.158989 | 0.073094 | -0.022121 | -0.006884 | 0.123356 | -0.015903 | 0.130908 | -0.024732 | -0.013967 | -0.025825 | 0.002139 | 0.000515 | -0.000614 | -0.020522 | -0.015510 | 0.068471 | 0.114396 | 0.008661 | 0.008875 | -0.005726 | 0.000682 | 0.066293 |
| nwoundus | -0.030874 | -0.030885 | 0.001435 | 0.001890 | -0.001891 | 0.006397 | -0.020898 | 0.008200 | -0.028958 | -0.004741 | -0.001062 | -0.004274 | 0.000798 | -0.002894 | -0.002330 | -0.003768 | -0.003726 | 0.004013 | 0.004953 | 0.007442 | -0.012683 | -0.092653 | -0.008540 | -0.008585 | 0.013539 | -0.027930 | -0.021414 | 0.038051 | -0.023541 | -0.007602 | 0.007361 | 0.005872 | -0.047597 | -0.089408 | -0.001954 | 0.043672 | -0.047167 | 0.010237 | -0.029006 | 0.002739 | -0.016321 | -0.202700 | -0.034568 | 0.085030 | 0.055117 | -0.003921 | -0.007001 | 0.003978 | -0.004068 | -0.006678 | -0.021161 | -0.020998 | NaN | NaN | 0.042583 | 0.417992 | 0.001034 | 0.158989 | 1.000000 | 0.000102 | 0.005157 | -0.010727 | 0.475270 | -0.000687 | 0.036401 | -0.035810 | 0.059425 | 0.010151 | 0.009080 | -0.007419 | -0.003300 | -0.005654 | -0.002915 | 0.007789 | -0.015583 | 0.004307 | 0.005233 | 0.009018 | 0.007871 | 0.000642 |
| nwoundte | 0.019343 | 0.019322 | 0.004519 | 0.001184 | -0.001899 | -0.024807 | -0.011936 | 0.012645 | 0.013584 | 0.036543 | 0.001131 | 0.004257 | -0.004359 | -0.051963 | 0.021962 | -0.030390 | 0.003995 | -0.000948 | 0.006940 | 0.021275 | -0.023409 | -0.037692 | -0.029575 | -0.027563 | -0.022997 | -0.014735 | -0.010772 | -0.031553 | -0.011480 | -0.020827 | -0.053740 | 0.024914 | -0.002113 | 0.010265 | -0.011662 | -0.079523 | -0.055065 | 0.070829 | 0.008187 | 0.013302 | 0.012812 | -0.009667 | -0.014938 | -0.080619 | NaN | 0.010518 | 0.022020 | -0.033573 | 0.008380 | -0.008233 | -0.049650 | -0.068162 | 0.559017 | -0.088288 | 0.139514 | -0.000363 | 0.670075 | 0.073094 | 0.000102 | 1.000000 | -0.012545 | 0.022346 | -0.000718 | -0.003469 | 0.001124 | 0.001014 | -0.006992 | 0.003162 | 0.014967 | 0.004074 | NaN | -0.007583 | NaN | -0.015788 | 0.009103 | 0.040688 | 0.040377 | -0.002851 | 0.035910 | -0.041481 |
| property | -0.295301 | -0.295310 | -0.000112 | -0.004497 | -0.012908 | 0.032665 | -0.181102 | -0.086839 | -0.177818 | 0.023172 | -0.028184 | -0.004276 | -0.003320 | 0.006517 | -0.114088 | -0.024681 | -0.019647 | -0.035800 | -0.069593 | 0.030083 | 0.173458 | 0.199808 | 0.001769 | 0.007128 | -0.000925 | -0.000774 | -0.003682 | 0.000096 | 0.005333 | 0.023997 | 0.016726 | -0.121825 | -0.123882 | -0.037520 | -0.042845 | 0.032791 | 0.042250 | 0.032552 | 0.001222 | 0.053385 | -0.053553 | 0.059927 | 0.038599 | -0.025274 | 0.092586 | 0.116075 | 0.018415 | 0.034626 | 0.109194 | 0.128866 | 0.125519 | 0.140658 | 0.150446 | 0.127067 | -0.015299 | 0.004271 | -0.025451 | -0.022121 | 0.005157 | -0.012545 | 1.000000 | -0.340912 | 0.001578 | 0.010770 | -0.009855 | 0.031639 | 0.137913 | 0.037260 | 0.253136 | 0.001930 | -0.039224 | 0.008894 | 0.018621 | -0.103426 | 0.029737 | 0.088721 | 0.087461 | 0.022138 | 0.102700 | -0.023668 |
| propextent | -0.154098 | -0.154093 | -0.006267 | -0.001644 | 0.029112 | -0.023932 | -0.069495 | -0.052534 | -0.073017 | 0.042295 | 0.019185 | 0.002559 | 0.004619 | -0.236984 | 0.006783 | -0.234248 | -0.094793 | 0.035571 | -0.006937 | -0.038341 | -0.095705 | -0.077737 | -0.041387 | -0.041586 | -0.003524 | 0.011713 | 0.016357 | 0.016268 | 0.042694 | 0.021358 | -0.103444 | -0.023552 | -0.042810 | -0.117844 | 0.027472 | 0.032339 | 0.317718 | 0.036956 | 0.031363 | -0.055575 | 0.051160 | -0.114489 | -0.016453 | -0.143638 | 0.257425 | 0.106430 | -0.009299 | -0.190115 | -0.056253 | -0.078993 | -0.125583 | -0.193161 | 0.067111 | 0.018435 | 0.022818 | -0.036667 | 0.031023 | -0.006884 | -0.010727 | 0.022346 | -0.340912 | 1.000000 | -0.050616 | 0.022928 | 0.036801 | -0.073239 | 0.091508 | 0.032368 | -0.101621 | 0.180008 | 0.426740 | 0.273895 | 0.073515 | 0.066029 | 0.052780 | 0.066315 | 0.065597 | 0.026329 | 0.072352 | -0.098013 |
| propvalue | -0.012391 | -0.012382 | -0.003645 | -0.001118 | -0.001526 | 0.038869 | -0.004394 | 0.009192 | -0.010263 | -0.005309 | -0.002421 | 0.001178 | 0.000621 | 0.003700 | 0.000006 | -0.007999 | -0.006405 | 0.002589 | 0.000912 | 0.000182 | -0.016800 | 0.057522 | 0.001227 | 0.001375 | 0.009278 | -0.028064 | -0.024501 | 0.010718 | 0.080479 | 0.106142 | 0.253977 | -0.004267 | -0.085256 | NaN | -0.002859 | -0.045622 | NaN | 0.012670 | 0.000167 | 0.009868 | -0.022592 | 0.070038 | 0.057268 | 0.218218 | 0.238305 | 0.065203 | -0.000687 | 0.004555 | 0.037600 | -0.004913 | -0.046500 | -0.058999 | -0.262032 | -0.400820 | 0.021531 | 0.482252 | 0.005118 | 0.123356 | 0.475270 | -0.000718 | 0.001578 | -0.050616 | 1.000000 | 0.000252 | -0.031451 | 0.054259 | 0.057416 | 0.043788 | 0.000860 | -0.060054 | -0.040999 | -0.055536 | -0.061455 | -0.047883 | 0.031569 | 0.009594 | 0.007989 | 0.020905 | 0.008526 | 0.007640 |
| ishostkid | -0.010183 | -0.010212 | 0.009172 | 0.008659 | 0.408247 | -0.019809 | -0.024141 | -0.024914 | -0.015005 | 0.020546 | 0.004230 | -0.017463 | 0.002831 | 0.042533 | -0.034154 | 0.060922 | -0.048177 | 0.041714 | -0.021783 | 0.203643 | -0.061719 | -0.115943 | 0.005485 | 0.009265 | -0.002329 | -0.041132 | -0.024770 | 0.056172 | 0.049714 | 0.063799 | 0.027688 | 0.025821 | 0.047862 | 0.170606 | 0.016769 | -0.022257 | -0.094421 | 0.008845 | 0.009844 | -0.003868 | 0.027224 | -0.077740 | 0.096052 | -0.024859 | -0.021174 | 0.029763 | 0.170645 | -0.074860 | 0.079138 | 0.074541 | -0.004733 | -0.050961 | -0.050379 | 0.015220 | -0.005581 | 0.009009 | -0.018776 | -0.015903 | -0.000687 | -0.003469 | 0.010770 | 0.022928 | 0.000252 | 1.000000 | 0.000296 | -0.000934 | 0.003414 | 0.010503 | -0.173683 | 0.011636 | NaN | -0.044826 | NaN | 0.033230 | -0.036889 | 0.034188 | 0.035626 | 0.018356 | 0.045067 | -0.143861 |
| nhostkid | 0.004759 | 0.004736 | 0.009363 | -0.018251 | 0.015291 | -0.010311 | 0.003637 | 0.019236 | 0.008687 | -0.000961 | -0.000417 | 0.008070 | 0.002222 | 0.000436 | 0.013113 | -0.017075 | -0.009945 | 0.019527 | 0.009546 | -0.009077 | -0.022732 | -0.103455 | 0.007480 | 0.004724 | -0.000835 | -0.003820 | -0.023613 | 0.180125 | -0.079211 | -0.077613 | 0.042047 | 0.016568 | 0.081962 | -0.183859 | -0.001036 | -0.067089 | -0.093553 | 0.038268 | 0.018266 | 0.010535 | 0.035125 | -0.068688 | 0.009408 | 0.268400 | 0.763863 | -0.042754 | 0.002104 | -0.003477 | -0.082155 | -0.038802 | -0.172456 | -0.081084 | -0.372503 | 0.004766 | 0.209368 | 0.020789 | 0.078872 | 0.130908 | 0.036401 | 0.001124 | -0.009855 | 0.036801 | -0.031451 | 0.000296 | 1.000000 | -0.005907 | 0.003023 | 0.006653 | 0.004136 | 0.060645 | -0.009913 | -0.007589 | -0.020417 | 0.021398 | 0.354204 | 0.008229 | 0.008172 | 0.001140 | 0.005139 | -0.014304 |
| nhostkidus | -0.018742 | -0.018770 | 0.009622 | -0.003203 | -0.003039 | -0.003277 | -0.032196 | 0.002625 | -0.006635 | -0.005192 | -0.037674 | 0.014340 | 0.009249 | -0.011756 | -0.028729 | -0.009922 | -0.015355 | 0.002748 | 0.028492 | 0.031370 | -0.010944 | -0.002640 | -0.000129 | 0.006628 | -0.056288 | -0.023846 | -0.021009 | -0.122464 | 0.062794 | 0.027765 | 0.061611 | 0.000275 | 0.020704 | 0.135660 | -0.001729 | 0.070129 | 0.104639 | -0.003021 | -0.000190 | 0.048462 | -0.045991 | 0.302579 | 0.090598 | 0.279925 | 0.790569 | 0.068736 | 0.023116 | -0.014526 | -0.005766 | 0.062505 | 0.141311 | 0.129332 | -0.019672 | 0.472953 | 0.089172 | 0.149791 | -0.008388 | -0.024732 | -0.035810 | 0.001014 | 0.031639 | -0.073239 | 0.054259 | -0.000934 | -0.005907 | 1.000000 | 0.018845 | 0.031802 | 0.039021 | 0.007793 | 0.005160 | 0.013008 | 0.022869 | -0.028739 | -0.028511 | 0.003413 | 0.003058 | -0.026020 | -0.014519 | -0.005646 |
| nhours | -0.455918 | -0.455884 | -0.026648 | -0.047535 | 0.178986 | -0.058584 | -0.246651 | -0.133086 | -0.294441 | -0.023228 | -0.039454 | -0.022330 | 0.001691 | 0.028139 | -0.165866 | -0.028058 | -0.076560 | 0.009837 | -0.024855 | -0.044504 | 0.039790 | -0.126307 | -0.059013 | -0.043001 | -0.016808 | -0.133346 | -0.105079 | 0.091881 | -0.062307 | -0.125548 | 0.039921 | -0.228559 | -0.435057 | -0.403404 | -0.144030 | 0.230507 | 0.612372 | 0.254488 | 0.003760 | 0.003536 | -0.011807 | -0.361799 | -0.103252 | -0.408248 | NaN | -0.173703 | -0.031667 | -0.217952 | -0.228262 | -0.303772 | -0.180219 | -0.274250 | -0.268720 | -0.280119 | -0.009629 | 0.055680 | 0.035709 | -0.013967 | 0.059425 | -0.006992 | 0.137913 | 0.091508 | 0.057416 | 0.003414 | 0.003023 | 0.018845 | 1.000000 | 0.195118 | 0.181191 | 0.094008 | -0.089520 | 0.121525 | 0.277595 | -0.301248 | 0.184045 | 0.062626 | 0.066565 | 0.072557 | 0.097766 | 0.002260 |
| ndays | -0.188772 | -0.188874 | -0.004028 | 0.007152 | 0.055386 | -0.030025 | -0.120691 | -0.044167 | -0.078447 | -0.003264 | 0.001488 | -0.018802 | 0.003642 | -0.011841 | -0.101788 | -0.029148 | -0.094735 | -0.005610 | -0.018526 | 0.049133 | -0.101793 | -0.108734 | -0.069611 | -0.056933 | 0.030716 | -0.091747 | -0.069826 | 0.027275 | -0.132249 | -0.053020 | -0.001498 | -0.031172 | 0.172821 | -0.384977 | -0.063392 | -0.072873 | NaN | 0.043888 | -0.000057 | 0.075051 | -0.024617 | 0.015337 | 0.160587 | -0.471666 | NaN | 0.128789 | 0.004902 | -0.069186 | -0.075790 | -0.094137 | -0.079119 | -0.011079 | 0.000000 | 0.989554 | -0.038451 | 0.042002 | -0.010761 | -0.025825 | 0.010151 | 0.003162 | 0.037260 | 0.032368 | 0.043788 | 0.010503 | 0.006653 | 0.031802 | 0.195118 | 1.000000 | 0.077967 | 0.132974 | 0.012201 | 0.055480 | 0.013097 | -0.493438 | 0.413987 | 0.079917 | 0.090344 | 0.169558 | 0.134139 | -0.020015 |
| ransom | -0.271519 | -0.271276 | -0.073089 | -0.001384 | -0.179355 | 0.027569 | -0.062253 | -0.026167 | -0.121560 | -0.001160 | -0.064515 | 0.022699 | -0.005447 | -0.040872 | -0.059695 | -0.104551 | 0.011152 | -0.024352 | -0.030694 | -0.083135 | 0.041164 | -0.007460 | -0.037220 | -0.033325 | 0.020451 | -0.039248 | -0.059998 | 0.072456 | 0.029520 | 0.032671 | 0.045388 | -0.112264 | -0.153966 | -0.532924 | -0.154711 | 0.037366 | 0.108893 | 0.042772 | -0.104247 | 0.028058 | -0.069962 | -0.082299 | -0.186263 | -0.040032 | 0.500244 | -0.119713 | -0.064859 | -0.006727 | -0.061492 | -0.030584 | -0.171472 | -0.031722 | -0.044394 | 0.165554 | -0.000330 | 0.006968 | 0.023501 | 0.002139 | 0.009080 | 0.014967 | 0.253136 | -0.101621 | 0.000860 | -0.173683 | 0.004136 | 0.039021 | 0.181191 | 0.077967 | 1.000000 | 0.021865 | 0.020894 | 0.049178 | 0.009317 | -0.171098 | 0.125086 | 0.010130 | 0.010482 | 0.008409 | 0.019062 | 0.044969 |
| ransomamt | -0.002849 | -0.002849 | -0.001555 | 0.013596 | -0.005537 | 0.009545 | 0.032361 | 0.060577 | 0.004206 | -0.016459 | 0.002251 | 0.018921 | 0.003016 | 0.011447 | 0.013378 | 0.052100 | -0.003295 | 0.016280 | -0.003016 | -0.008845 | -0.095920 | 0.184620 | -0.023941 | -0.027989 | -0.002072 | 0.057208 | 0.045949 | 0.010577 | -0.023638 | -0.086248 | 0.127413 | 0.039506 | 0.164900 | NaN | -0.013500 | -0.176649 | NaN | 0.020936 | -0.012861 | 0.035922 | -0.060852 | 0.042649 | 0.336117 | NaN | NaN | -0.077179 | -0.010745 | -0.014986 | -0.196358 | -0.193138 | -0.301823 | -0.316735 | NaN | 0.904194 | 0.072828 | 0.132575 | -0.010004 | 0.000515 | -0.007419 | 0.004074 | 0.001930 | 0.180008 | -0.060054 | 0.011636 | 0.060645 | 0.007793 | 0.094008 | 0.132974 | 0.021865 | 1.000000 | 0.366621 | 0.089996 | -0.011159 | -0.003207 | 0.053834 | 0.016886 | 0.017811 | 0.019470 | 0.027997 | -0.006941 |
| ransomamtus | -0.000461 | -0.000810 | 0.066517 | 0.019458 | 0.033104 | 0.056563 | 0.078801 | 0.062228 | -0.025833 | 0.000937 | -0.028727 | 0.018996 | NaN | 0.007025 | -0.026711 | 0.047332 | 0.018828 | 0.004046 | NaN | -0.028868 | -0.086699 | NaN | 0.009375 | -0.008339 | 0.036658 | 0.156398 | 0.169222 | 0.206126 | 0.110811 | -0.084441 | 0.252067 | 0.104314 | 0.156901 | NaN | -0.035661 | -0.184637 | NaN | -0.008042 | 0.011468 | 0.007314 | 0.185129 | 0.621921 | NaN | NaN | NaN | 0.039705 | -0.030813 | -0.028565 | -0.137716 | -0.095537 | NaN | NaN | NaN | NaN | 0.011212 | 0.587997 | 0.013775 | -0.000614 | -0.003300 | NaN | -0.039224 | 0.426740 | -0.040999 | NaN | -0.009913 | 0.005160 | -0.089520 | 0.012201 | 0.020894 | 0.366621 | 1.000000 | 0.008500 | -0.000285 | 0.053442 | 0.034827 | 0.022348 | 0.032029 | 0.121914 | 0.053744 | -0.005729 |
| ransompaid | -0.169650 | -0.169685 | 0.003059 | 0.005159 | -0.047390 | -0.081457 | -0.053309 | -0.064826 | -0.128899 | -0.063543 | -0.035756 | 0.004353 | NaN | 0.011612 | -0.174019 | 0.042566 | -0.022776 | 0.006693 | NaN | 0.012730 | -0.061284 | -0.514984 | -0.099305 | -0.115490 | -0.026875 | -0.058656 | -0.059868 | -0.098631 | -0.318670 | -0.346607 | -0.056576 | -0.078637 | 0.235952 | NaN | -0.052783 | 0.341210 | NaN | 0.121543 | -0.027489 | 0.004343 | 0.101824 | -0.091959 | 1.000000 | NaN | NaN | -0.108367 | 0.068307 | -0.058699 | -0.218838 | -0.180625 | NaN | NaN | NaN | NaN | -0.019389 | -0.009771 | -0.009871 | -0.020522 | -0.005654 | -0.007583 | 0.008894 | 0.273895 | -0.055536 | -0.044826 | -0.007589 | 0.013008 | 0.121525 | 0.055480 | 0.049178 | 0.089996 | 0.008500 | 1.000000 | -0.002433 | -0.104193 | 0.066349 | -0.082402 | -0.079871 | 0.001113 | -0.082577 | -0.009473 |
| ransompaidus | -0.172339 | -0.172205 | -0.026813 | 0.002655 | 0.016856 | -0.036869 | -0.081445 | 0.034211 | -0.139254 | -0.055242 | -0.031980 | -0.091254 | NaN | 0.007773 | -0.344508 | 0.054793 | -0.023865 | 0.004476 | NaN | 0.020887 | -0.094529 | NaN | 0.008996 | 0.048495 | 0.059576 | 0.055053 | 0.078618 | 0.028187 | 0.206612 | -0.015329 | 0.189192 | -0.065762 | NaN | NaN | -0.040881 | NaN | NaN | 0.082137 | 0.004295 | -0.308770 | -0.096632 | NaN | NaN | NaN | NaN | -0.079969 | 0.120271 | -0.011415 | 0.089119 | -0.340305 | NaN | NaN | NaN | NaN | -0.031223 | -0.005019 | -0.006406 | -0.015510 | -0.002915 | NaN | 0.018621 | 0.073515 | -0.061455 | NaN | -0.020417 | 0.022869 | 0.277595 | 0.013097 | 0.009317 | -0.011159 | -0.000285 | -0.002433 | 1.000000 | -0.076922 | 0.034879 | -0.049916 | -0.044482 | 0.138033 | 0.062671 | -0.006338 |
| hostkidoutcome | 0.292161 | 0.292178 | 0.016438 | -0.001562 | 0.175605 | 0.017857 | 0.192969 | 0.051753 | 0.119757 | 0.030799 | 0.034029 | 0.004447 | -0.026565 | -0.014695 | 0.175146 | 0.007434 | 0.116238 | 0.016109 | 0.030142 | -0.003855 | 0.051984 | 0.123005 | 0.084794 | 0.063791 | -0.023236 | 0.070537 | 0.077325 | -0.002226 | 0.005734 | -0.028977 | -0.045297 | 0.083488 | 0.022582 | -0.097317 | 0.086771 | -0.107781 | -0.143877 | -0.120628 | 0.000335 | -0.076291 | 0.010944 | 0.048072 | 0.086917 | 0.050594 | -0.694365 | -0.084546 | 0.015935 | 0.011093 | 0.084271 | -0.028129 | 0.042162 | 0.036080 | -0.483896 | -0.519332 | 0.052130 | -0.007804 | 0.018045 | 0.068471 | 0.007789 | -0.015788 | -0.103426 | 0.066029 | -0.047883 | 0.033230 | 0.021398 | -0.028739 | -0.301248 | -0.493438 | -0.171098 | -0.003207 | 0.053442 | -0.104193 | -0.076922 | 1.000000 | -0.627725 | -0.057010 | -0.062335 | -0.129516 | -0.121607 | -0.016443 |
| nreleased | -0.228536 | -0.228479 | -0.024800 | 0.013693 | -0.185049 | -0.047574 | -0.160487 | 0.006914 | -0.041735 | -0.031348 | -0.012263 | 0.004999 | 0.022271 | 0.034898 | -0.159293 | 0.010615 | -0.114883 | -0.032208 | 0.005994 | -0.047535 | -0.103588 | -0.069251 | -0.043899 | -0.032332 | 0.016045 | -0.024379 | -0.047155 | 0.190987 | -0.135547 | -0.112903 | 0.177521 | -0.035787 | 0.102421 | -0.254746 | -0.054215 | -0.077857 | -0.002750 | 0.139419 | 0.005645 | 0.086461 | -0.011543 | 0.040913 | -0.053700 | -0.150436 | 0.914652 | 0.089514 | -0.037182 | 0.027428 | -0.136887 | -0.062037 | -0.213369 | -0.162824 | 0.259311 | 0.798374 | 0.024171 | 0.010414 | 0.024787 | 0.114396 | -0.015583 | 0.009103 | 0.029737 | 0.052780 | 0.031569 | -0.036889 | 0.354204 | -0.028511 | 0.184045 | 0.413987 | 0.125086 | 0.053834 | 0.034827 | 0.066349 | 0.034879 | -0.627725 | 1.000000 | 0.056317 | 0.061052 | 0.098843 | 0.099866 | -0.023140 |
| INT_LOG | -0.234006 | -0.234008 | -0.003852 | -0.006595 | 0.050541 | 0.079423 | -0.153248 | -0.140778 | -0.175436 | 0.079861 | 0.003202 | 0.087052 | -0.027124 | -0.106573 | 0.226361 | -0.179344 | 0.082953 | 0.059611 | -0.000401 | 0.038970 | 0.021847 | 0.038360 | -0.049931 | -0.032829 | 0.037240 | -0.079060 | -0.082476 | 0.016864 | -0.077724 | -0.086118 | 0.015443 | 0.222771 | -0.027741 | -0.019648 | 0.257119 | 0.006106 | 0.282090 | 0.028509 | -0.002897 | 0.123522 | -0.011405 | 0.027318 | -0.073112 | 0.012608 | -0.014631 | 0.188011 | 0.035244 | -0.124174 | -0.061919 | -0.072355 | -0.046920 | -0.066502 | -0.182583 | -0.292512 | 0.056675 | 0.007321 | 0.068638 | 0.008661 | 0.004307 | 0.040688 | 0.088721 | 0.066315 | 0.009594 | 0.034188 | 0.008229 | 0.003413 | 0.062626 | 0.079917 | 0.010130 | 0.016886 | 0.022348 | -0.082402 | -0.049916 | -0.057010 | 0.056317 | 1.000000 | 0.996571 | 0.060332 | 0.880709 | -0.111608 |
| INT_IDEO | -0.231593 | -0.231594 | -0.003547 | -0.006918 | 0.053485 | 0.077992 | -0.148840 | -0.139897 | -0.172980 | 0.079318 | 0.002500 | 0.086884 | -0.027153 | -0.108488 | 0.227273 | -0.180215 | 0.081887 | 0.060016 | 0.001115 | 0.039385 | 0.018162 | 0.030498 | -0.053241 | -0.035646 | 0.048039 | -0.083701 | -0.086455 | 0.028535 | -0.076460 | -0.083376 | 0.029293 | 0.224276 | -0.030374 | -0.173232 | 0.257382 | 0.047856 | 0.242215 | 0.028253 | -0.002522 | 0.124145 | -0.012039 | -0.042944 | -0.114261 | -0.164594 | -0.131805 | 0.193223 | 0.035285 | -0.123801 | -0.064585 | -0.073811 | -0.053467 | -0.075466 | -0.199934 | -0.315711 | 0.057400 | 0.008487 | 0.069164 | 0.008875 | 0.005233 | 0.040377 | 0.087461 | 0.065597 | 0.007989 | 0.035626 | 0.008172 | 0.003058 | 0.066565 | 0.090344 | 0.010482 | 0.017811 | 0.032029 | -0.079871 | -0.044482 | -0.062335 | 0.061052 | 0.996571 | 1.000000 | 0.091938 | 0.883116 | -0.110908 |
| INT_MISC | -0.077012 | -0.077005 | -0.003416 | -0.003545 | 0.030440 | 0.212349 | 0.048161 | 0.104096 | -0.032613 | -0.022455 | -0.011080 | 0.018515 | -0.013349 | -0.039076 | 0.024566 | -0.040265 | -0.028053 | -0.017657 | 0.000310 | 0.013573 | -0.002880 | -0.048854 | -0.050825 | -0.037745 | 0.366017 | -0.081103 | -0.087315 | 0.259955 | -0.030702 | -0.010270 | 0.232052 | -0.004328 | -0.047323 | 0.036173 | -0.007005 | -0.033818 | 0.067628 | 0.004316 | 0.044276 | 0.014558 | 0.033224 | 0.035443 | 0.031089 | 0.028146 | -0.299284 | 0.000661 | -0.010050 | -0.001089 | -0.025441 | 0.005799 | -0.044871 | -0.063517 | -0.024523 | -0.078956 | -0.016067 | 0.005080 | -0.000300 | -0.005726 | 0.009018 | -0.002851 | 0.022138 | 0.026329 | 0.020905 | 0.018356 | 0.001140 | -0.026020 | 0.072557 | 0.169558 | 0.008409 | 0.019470 | 0.121914 | 0.001113 | 0.138033 | -0.129516 | 0.098843 | 0.060332 | 0.091938 | 1.000000 | 0.266785 | -0.004481 |
| INT_ANY | -0.266880 | -0.266873 | -0.007753 | -0.005982 | 0.064947 | 0.168451 | -0.113385 | -0.079731 | -0.180382 | 0.066226 | -0.002772 | 0.078969 | -0.031262 | -0.102216 | 0.160755 | -0.158324 | 0.048626 | 0.035563 | -0.004842 | 0.055426 | 0.015036 | 0.048233 | -0.052555 | -0.038051 | 0.155235 | -0.097963 | -0.105167 | 0.123931 | -0.100342 | -0.098619 | 0.124770 | 0.184116 | -0.032209 | -0.187605 | 0.223806 | 0.033380 | 0.231277 | 0.030257 | 0.003724 | 0.107060 | -0.006942 | -0.021627 | -0.075177 | -0.118858 | -0.076082 | 0.172587 | 0.049276 | -0.114073 | -0.058558 | -0.060736 | -0.056121 | -0.055507 | -0.080742 | -0.234329 | 0.041136 | 0.010069 | 0.060943 | 0.000682 | 0.007871 | 0.035910 | 0.102700 | 0.072352 | 0.008526 | 0.045067 | 0.005139 | -0.014519 | 0.097766 | 0.134139 | 0.019062 | 0.027997 | 0.053744 | -0.082577 | 0.062671 | -0.121607 | 0.099866 | 0.880709 | 0.883116 | 0.266785 | 1.000000 | -0.114971 |
| is_bombing | 0.092875 | 0.092877 | -0.001512 | 0.009514 | -0.195264 | -0.051108 | 0.075053 | 0.075630 | 0.037006 | -0.084506 | -0.013761 | 0.078870 | 0.045892 | 0.081730 | 0.119270 | -0.051231 | 0.115780 | -0.032827 | 0.160291 | -0.096994 | -0.335019 | 0.257285 | 0.106886 | 0.071305 | -0.039283 | 0.073966 | 0.049974 | -0.046021 | -0.058701 | -0.087561 | -0.007143 | -0.020158 | 0.055303 | -0.049805 | -0.002948 | 0.107528 | 0.081894 | -0.072612 | 0.011627 | 0.001045 | -0.043560 | 0.117717 | 0.179775 | 0.149810 | 0.135286 | -0.066698 | -0.169767 | 0.639508 | -0.243656 | -0.163070 | -0.211704 | -0.256816 | -0.224095 | -0.258205 | -0.048800 | -0.004405 | -0.045060 | 0.066293 | 0.000642 | -0.041481 | -0.023668 | -0.098013 | 0.007640 | -0.143861 | -0.014304 | -0.005646 | 0.002260 | -0.020015 | 0.044969 | -0.006941 | -0.005729 | -0.009473 | -0.006338 | -0.016443 | -0.023140 | -0.111608 | -0.110908 | -0.004481 | -0.114971 | 1.000000 |
tsdf = data[["approxdate", "is_bombing"]]
tsdf2 = tsdf.groupby("approxdate").is_bombing.agg(["sum"])
tsdf2.resample("M").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x145d4b310>
tsdf2["sum"].resample("M").sum().autocorr(lag=12)
0.88878939261556356
pd.rolling_mean(tsdf2, window=90, center=True).plot()
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:1: FutureWarning: pd.rolling_mean is deprecated for DataFrame and will be removed in a future version, replace with DataFrame.rolling(window=90,center=True).mean() if __name__ == '__main__':
<matplotlib.axes._subplots.AxesSubplot at 0x126656950>
tsdf2["change_in_numattacks"] = tsdf2["sum"].diff(periods = 1)
tsdf2.change_in_numattacks.resample("BA").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x146f85610>
tsdf2["sum"].resample("BA").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x1471cdad0>
bombsperyear = tsdf2[["sum"]].resample("A").sum()
bombsperyear.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x142a69d10>
pizza = tsdf2.loc["1991":"1995",:]
pizza["sum"].resample("M").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14c9d2510>
pizza["change_in_numattacks"].resample("M").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14c81af10>
pizza1 = tsdf2.loc["1970":"1992",:]
pizza2 = tsdf2.loc["1994":"2015",:]
pizza1["sum"].resample("M").sum().autocorr(lag = 12)
0.76047781547228566
pizza2["sum"].resample("M").sum().autocorr(lag = -12)
0.88503075768447148
pizza1["sum"].resample("A").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14d3fc510>
pizza1["sum"].resample("A").sum().autocorr(lag = 1)
0.95255326438331178
pizza2["sum"].resample("A").sum().plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14d3af890>
pizza2["sum"].resample("A").sum().autocorr(lag = -1)
0.94126076572961992
pizza1["sum"].resample("A").sum().plot()
pizza2["sum"].resample("A").sum().plot()
plt.show()
plot_acf(pizza1["sum"].resample("A").sum(), lags = 20)
plot_pacf(pizza1["sum"].resample("A").sum(), lags = 20)
plot_acf(pizza2["sum"].resample("A").sum(), lags = 20)
plot_pacf(pizza2["sum"].resample("A").sum(), lags = 20)
plt.show()
##use two-year periods for prediction
oldpizza = pizza1[["sum"]].resample("A").sum().astype(float)
newpizza = pizza2[["sum"]].resample("A").sum().astype(float)
plot_acf(pizza1["change_in_numattacks"].resample("A").sum(), lags = 20)
plot_pacf(pizza1["change_in_numattacks"].resample("A").sum(), lags = 20)
plot_acf(pizza2["change_in_numattacks"].resample("A").sum(), lags = 20)
plot_pacf(pizza2["change_in_numattacks"].resample("A").sum(), lags = 20)
plt.show()
ovalues = oldpizza['sum'].values
odates = oldpizza.index
model = ARMA(oldpizza, (2,0)).fit()
model.summary()
| Dep. Variable: | sum | No. Observations: | 23 |
|---|---|---|---|
| Model: | ARMA(2, 0) | Log Likelihood | -154.654 |
| Method: | css-mle | S.D. of innovations | 190.399 |
| Date: | Wed, 10 May 2017 | AIC | 317.308 |
| Time: | 19:18:58 | BIC | 321.850 |
| Sample: | 12-31-1970 | HQIC | 318.450 |
| - 12-31-1992 |
| coef | std err | z | P>|z| | [0.025 | 0.975] | |
|---|---|---|---|---|---|---|
| const | 1044.9193 | 589.356 | 1.773 | 0.091 | -110.196 | 2200.035 |
| ar.L1.sum | 0.8015 | 0.211 | 3.798 | 0.001 | 0.388 | 1.215 |
| ar.L2.sum | 0.1643 | 0.218 | 0.752 | 0.461 | -0.264 | 0.592 |
| Real | Imaginary | Modulus | Frequency | |
|---|---|---|---|---|
| AR.1 | 1.0302 +0.0000j 1.0302 0.0000||||
| AR.2 | -5.9088 +0.0000j 5.9088 0.5000
plot_acf(model.resid, lags=20)
model.predict()
1970-12-31 1044.919285 1971-12-31 362.179502 1972-12-31 281.246659 1973-12-31 223.963769 1974-12-31 185.766941 1975-12-31 287.886364 1976-12-31 378.990314 1977-12-31 432.390280 1978-12-31 613.556558 1979-12-31 656.254438 1980-12-31 988.738146 1981-12-31 1008.498271 1982-12-31 1066.765965 1983-12-31 1115.192858 1984-12-31 1219.234244 1985-12-31 1663.087400 1986-12-31 1515.162698 1987-12-31 1486.263539 1988-12-31 1466.162323 1989-12-31 1600.688860 1990-12-31 1747.089153 1991-12-31 1718.341746 1992-12-31 1913.475790 Freq: A-DEC, dtype: float64
model.resid.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14dc0eb50>
newpizza.sort_index(ascending = False, inplace = True)
newpizza.head()
| sum | |
|---|---|
| approxdate | |
| 2015-12-31 | 7615.0 |
| 2014-12-31 | 8759.0 |
| 2013-12-31 | 6669.0 |
| 2012-12-31 | 5080.0 |
| 2011-12-31 | 2587.0 |
model2 = ARMA(newpizza, (2,0)).fit()
model2.summary()
| Dep. Variable: | sum | No. Observations: | 22 |
|---|---|---|---|
| Model: | ARMA(2, 0) | Log Likelihood | -179.408 |
| Method: | css-mle | S.D. of innovations | 795.479 |
| Date: | Wed, 10 May 2017 | AIC | 366.815 |
| Time: | 19:30:37 | BIC | 371.179 |
| Sample: | 12-31-2015 | HQIC | 367.843 |
| - 12-31-1994 |
| coef | std err | z | P>|z| | [0.025 | 0.975] | |
|---|---|---|---|---|---|---|
| const | 2701.8743 | 1403.476 | 1.925 | 0.069 | -48.888 | 5452.636 |
| ar.L1.sum | 1.3925 | 0.205 | 6.790 | 0.000 | 0.991 | 1.794 |
| ar.L2.sum | -0.5089 | 0.254 | -2.006 | 0.059 | -1.006 | -0.012 |
| Real | Imaginary | Modulus | Frequency | |
|---|---|---|---|---|
| AR.1 | 1.3683 -0.3049j 1.4019 -0.0349||||
| AR.2 | 1.3683 +0.3049j 1.4019 0.0349
plot_acf(model2.resid, lags=20)
plt.show()
model.resid
approxdate 1970-12-31 -711.919285 1971-12-31 -124.179502 1972-12-31 -95.246659 1973-12-31 -74.963769 1974-12-31 98.233059 1975-12-31 82.113636 1976-12-31 40.009686 1977-12-31 202.609720 1978-12-31 30.443442 1979-12-31 400.745562 1980-12-31 8.261854 1981-12-31 73.501729 1982-12-31 58.234035 1983-12-31 130.807142 1984-12-31 555.765756 1985-12-31 -181.087400 1986-12-31 -9.162698 1987-12-31 -10.263539 1988-12-31 183.837677 1989-12-31 196.311140 1990-12-31 -16.089153 1991-12-31 269.658254 1992-12-31 -175.475790 Freq: A-DEC, dtype: float64
model2.resid
approxdate 2015-12-31 4913.125727 2014-12-31 1522.791896 2013-12-31 -1967.504776 2012-12-31 -64.006655 2011-12-31 -1407.788737 2010-12-31 1175.204115 2009-12-31 76.038538 2008-12-31 31.564102 2007-12-31 -823.146720 2006-12-31 -64.975259 2005-12-31 -392.867437 2004-12-31 -376.655820 2003-12-31 -6.991231 2002-12-31 -204.139604 2001-12-31 -171.314476 2000-12-31 -160.228163 1999-12-31 -513.048454 1998-12-31 -258.229941 1997-12-31 438.632732 1996-12-31 -404.648667 1995-12-31 -646.566548 1994-12-31 356.480042 Freq: -1A-DEC, dtype: float64
model2.resid.plot()
<matplotlib.axes._subplots.AxesSubplot at 0x14f0fef90>
tsdf2.head()
| sum | change_in_numattacks | |
|---|---|---|
| approxdate | ||
| 1970-01-01 | 1 | NaN |
| 1970-01-02 | 1 | 0.0 |
| 1970-01-03 | 0 | -1.0 |
| 1970-01-06 | 0 | 0.0 |
| 1970-01-08 | 0 | 0.0 |
tsdf.head()
| approxdate | is_bombing | |
|---|---|---|
| 0 | 1970-02-05 | 0 |
| 1 | 1970-09-06 | 0 |
| 2 | 1970-01-08 | 0 |
| 3 | 1970-01-14 | 1 |
| 4 | 1970-01-16 | 0 |
#tsdf2 = tsdf.groupby("approxdate").is_bombing.agg(["sum"])
#tsdf2["yearmonth"] = tsdf2.index.resample("M")
#df['mnth_yr'] = df['date_column'].apply(lambda x: x.strftime('%B-%Y'))
tsdf["yearmonth"] = tsdf.approxdate.apply(lambda x: x.strftime("%B-%Y"))
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:1: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy if __name__ == '__main__':
tsdf["yearmonth"] = pd.to_datetime(tsdf.yearmonth)
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:1: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy if __name__ == '__main__':
tsdf.dtypes
approxdate datetime64[ns] is_bombing int64 yearmonth datetime64[ns] dtype: object
tsdf3 = tsdf.groupby("yearmonth").is_bombing.agg(["sum"])
tsdf2.resample("M").sum()
| sum | change_in_numattacks | |
|---|---|---|
| approxdate | ||
| 1970-01-31 | 15.0 | 0.0 |
| 1970-02-28 | 32.0 | -1.0 |
| 1970-03-31 | 41.0 | 2.0 |
| 1970-04-30 | 46.0 | -1.0 |
| 1970-05-31 | 28.0 | 0.0 |
| 1970-06-30 | 26.0 | -1.0 |
| 1970-07-31 | 38.0 | 0.0 |
| 1970-08-31 | 20.0 | 1.0 |
| 1970-09-30 | 20.0 | -1.0 |
| 1970-10-31 | 31.0 | 4.0 |
| 1970-11-30 | 20.0 | -4.0 |
| 1970-12-31 | 16.0 | 1.0 |
| 1971-01-31 | 18.0 | 3.0 |
| 1971-02-28 | 23.0 | -2.0 |
| 1971-03-31 | 28.0 | -2.0 |
| 1971-04-30 | 33.0 | 1.0 |
| 1971-05-31 | 24.0 | -1.0 |
| 1971-06-30 | 21.0 | 1.0 |
| 1971-07-31 | 17.0 | 0.0 |
| 1971-08-31 | 23.0 | 0.0 |
| 1971-09-30 | 16.0 | -1.0 |
| 1971-10-31 | 10.0 | 0.0 |
| 1971-11-30 | 14.0 | 1.0 |
| 1971-12-31 | 11.0 | 0.0 |
| 1972-01-31 | 23.0 | 0.0 |
| 1972-02-29 | 14.0 | -1.0 |
| 1972-03-31 | 16.0 | 1.0 |
| 1972-04-30 | 8.0 | -1.0 |
| 1972-05-31 | 38.0 | 4.0 |
| 1972-06-30 | 10.0 | -4.0 |
| 1972-07-31 | 13.0 | 1.0 |
| 1972-08-31 | 14.0 | -1.0 |
| 1972-09-30 | 10.0 | 1.0 |
| 1972-10-31 | 12.0 | 0.0 |
| 1972-11-30 | 13.0 | -1.0 |
| 1972-12-31 | 15.0 | 0.0 |
| 1973-01-31 | 10.0 | 0.0 |
| 1973-02-28 | 5.0 | 0.0 |
| 1973-03-31 | 18.0 | 1.0 |
| 1973-04-30 | 12.0 | 1.0 |
| 1973-05-31 | 19.0 | 0.0 |
| 1973-06-30 | 5.0 | -2.0 |
| 1973-07-31 | 14.0 | 1.0 |
| 1973-08-31 | 13.0 | 0.0 |
| 1973-09-30 | 13.0 | -1.0 |
| 1973-10-31 | 13.0 | 0.0 |
| 1973-11-30 | 12.0 | 0.0 |
| 1973-12-31 | 15.0 | 4.0 |
| 1974-01-31 | 13.0 | -4.0 |
| 1974-02-28 | 26.0 | 1.0 |
| 1974-03-31 | 29.0 | -1.0 |
| 1974-04-30 | 13.0 | 1.0 |
| 1974-05-31 | 27.0 | 1.0 |
| 1974-06-30 | 23.0 | -2.0 |
| 1974-07-31 | 16.0 | 0.0 |
| 1974-08-31 | 18.0 | 1.0 |
| 1974-09-30 | 29.0 | -1.0 |
| 1974-10-31 | 29.0 | 1.0 |
| 1974-11-30 | 22.0 | -1.0 |
| 1974-12-31 | 39.0 | 7.0 |
| 1975-01-31 | 22.0 | -7.0 |
| 1975-02-28 | 36.0 | 1.0 |
| 1975-03-31 | 47.0 | 2.0 |
| 1975-04-30 | 27.0 | -1.0 |
| 1975-05-31 | 39.0 | 0.0 |
| 1975-06-30 | 20.0 | -2.0 |
| 1975-07-31 | 16.0 | 1.0 |
| 1975-08-31 | 28.0 | -1.0 |
| 1975-09-30 | 39.0 | 1.0 |
| 1975-10-31 | 45.0 | 1.0 |
| ... | ... | ... |
| 2010-03-31 | 196.0 | -4.0 |
| 2010-04-30 | 223.0 | -1.0 |
| 2010-05-31 | 224.0 | -1.0 |
| 2010-06-30 | 203.0 | 6.0 |
| 2010-07-31 | 220.0 | -7.0 |
| 2010-08-31 | 209.0 | 0.0 |
| 2010-09-30 | 251.0 | 7.0 |
| 2010-10-31 | 177.0 | -5.0 |
| 2010-11-30 | 257.0 | 4.0 |
| 2010-12-31 | 189.0 | -4.0 |
| 2011-01-31 | 199.0 | 5.0 |
| 2011-02-28 | 192.0 | -5.0 |
| 2011-03-31 | 218.0 | 5.0 |
| 2011-04-30 | 220.0 | -9.0 |
| 2011-05-31 | 211.0 | 6.0 |
| 2011-06-30 | 175.0 | 2.0 |
| 2011-07-31 | 171.0 | -4.0 |
| 2011-08-31 | 181.0 | -3.0 |
| 2011-09-30 | 152.0 | 4.0 |
| 2011-10-31 | 180.0 | 0.0 |
| 2011-11-30 | 395.0 | 1.0 |
| 2011-12-31 | 293.0 | -2.0 |
| 2012-01-31 | 437.0 | 4.0 |
| 2012-02-29 | 329.0 | 5.0 |
| 2012-03-31 | 384.0 | 4.0 |
| 2012-04-30 | 445.0 | 4.0 |
| 2012-05-31 | 543.0 | -3.0 |
| 2012-06-30 | 463.0 | -3.0 |
| 2012-07-31 | 421.0 | 9.0 |
| 2012-08-31 | 464.0 | -10.0 |
| 2012-09-30 | 382.0 | 6.0 |
| 2012-10-31 | 448.0 | -11.0 |
| 2012-11-30 | 438.0 | 2.0 |
| 2012-12-31 | 326.0 | 15.0 |
| 2013-01-31 | 452.0 | -15.0 |
| 2013-02-28 | 390.0 | 9.0 |
| 2013-03-31 | 428.0 | -7.0 |
| 2013-04-30 | 538.0 | 5.0 |
| 2013-05-31 | 618.0 | -9.0 |
| 2013-06-30 | 467.0 | 13.0 |
| 2013-07-31 | 660.0 | 3.0 |
| 2013-08-31 | 576.0 | -16.0 |
| 2013-09-30 | 509.0 | 14.0 |
| 2013-10-31 | 684.0 | -4.0 |
| 2013-11-30 | 689.0 | -4.0 |
| 2013-12-31 | 658.0 | 11.0 |
| 2014-01-31 | 704.0 | -2.0 |
| 2014-02-28 | 774.0 | 3.0 |
| 2014-03-31 | 841.0 | 3.0 |
| 2014-04-30 | 743.0 | -4.0 |
| 2014-05-31 | 926.0 | -4.0 |
| 2014-06-30 | 669.0 | 4.0 |
| 2014-07-31 | 900.0 | -5.0 |
| 2014-08-31 | 678.0 | 0.0 |
| 2014-09-30 | 606.0 | 1.0 |
| 2014-10-31 | 657.0 | 12.0 |
| 2014-11-30 | 663.0 | -16.0 |
| 2014-12-31 | 598.0 | 8.0 |
| 2015-01-31 | 824.0 | -5.0 |
| 2015-02-28 | 750.0 | 1.0 |
| 2015-03-31 | 639.0 | -9.0 |
| 2015-04-30 | 603.0 | 10.0 |
| 2015-05-31 | 623.0 | -1.0 |
| 2015-06-30 | 591.0 | 13.0 |
| 2015-07-31 | 659.0 | -23.0 |
| 2015-08-31 | 637.0 | 5.0 |
| 2015-09-30 | 517.0 | -1.0 |
| 2015-10-31 | 630.0 | 7.0 |
| 2015-11-30 | 572.0 | -2.0 |
| 2015-12-31 | 570.0 | -1.0 |
552 rows × 2 columns
tsdf3["sum"] = tsdf3["sum"].astype(float)
tsdf3["change"] = tsdf3["sum"].diff(periods = 1)
tsdf3.head()
| sum | change | |
|---|---|---|
| yearmonth | ||
| 1970-01-01 | 15.0 | NaN |
| 1970-02-01 | 32.0 | 17.0 |
| 1970-03-01 | 41.0 | 9.0 |
| 1970-04-01 | 46.0 | 5.0 |
| 1970-05-01 | 28.0 | -18.0 |
decomposition = seasonal_decompose(tsdf3["sum"], freq=12)
fig = plt.figure()
fig = decomposition.plot()
fig.set_size_inches(15, 8)
<matplotlib.figure.Figure at 0x14f0fe210>
decomposition = seasonal_decompose(oldpizza["sum"], freq=2)
fig = plt.figure()
fig = decomposition.plot()
fig.set_size_inches(15, 8)
<matplotlib.figure.Figure at 0x148873c10>
decomposition = seasonal_decompose(newpizza["sum"], freq=2)
fig = plt.figure()
fig = decomposition.plot()
fig.set_size_inches(15, 8)
<matplotlib.figure.Figure at 0x14946df50>
decomposition = seasonal_decompose(tsdf2["sum"], freq=365)
fig = plt.figure()
fig = decomposition.plot()
fig.set_size_inches(15, 8)
<matplotlib.figure.Figure at 0x150008cd0>
def test_stationarity(timeseries):
#Determing rolling statistics
rolmean = pd.rolling_mean(timeseries, window=12)
rolstd = pd.rolling_std(timeseries, window=12)
#Plot rolling statistics:
fig = plt.figure(figsize=(12, 8))
orig = plt.plot(timeseries, color='blue',label='Original')
mean = plt.plot(rolmean, color='red', label='Rolling Mean')
std = plt.plot(rolstd, color='black', label = 'Rolling Std')
plt.legend(loc='best')
plt.title('Rolling Mean & Standard Deviation')
plt.show()
#Perform Dickey-Fuller test:
print 'Results of Dickey-Fuller Test:'
dftest = adfuller(timeseries, autolag='AIC')
dfoutput = pd.Series(dftest[0:4], index=['Test Statistic','p-value','#Lags Used','Number of Observations Used'])
for key,value in dftest[4].items():
dfoutput['Critical Value (%s)'%key] = value
print dfoutput
test_stationarity(tsdf3["sum"])
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic 0.445415 p-value 0.983116 #Lags Used 11.000000 Number of Observations Used 528.000000 Critical Value (5%) -2.867030 Critical Value (1%) -3.442796 Critical Value (10%) -2.569694 dtype: float64
test_stationarity(tsdf3.change.dropna(inplace=False))
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic -7.339097e+00 p-value 1.076937e-10 #Lags Used 1.100000e+01 Number of Observations Used 5.270000e+02 Critical Value (5%) -2.867040e+00 Critical Value (1%) -3.442820e+00 Critical Value (10%) -2.569699e+00 dtype: float64
tsdf3["SAD"] = tsdf3["sum"] - tsdf3["sum"].shift(12)
test_stationarity(tsdf3["SAD"].dropna(inplace=False))
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic -3.533627 p-value 0.007164 #Lags Used 15.000000 Number of Observations Used 512.000000 Critical Value (5%) -2.867202 Critical Value (1%) -3.443187 Critical Value (10%) -2.569785 dtype: float64
tsdf3["SADchange"] = tsdf3.change - tsdf3.change.shift(12)
test_stationarity(tsdf3.SADchange.dropna(inplace=False))
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic -7.874770e+00 p-value 4.877171e-12 #Lags Used 1.900000e+01 Number of Observations Used 5.070000e+02 Critical Value (5%) -2.867258e+00 Critical Value (1%) -3.443314e+00 Critical Value (10%) -2.569815e+00 dtype: float64
ts_log = np.log(tsdf3["sum"])
plt.plot(ts_log)
[<matplotlib.lines.Line2D at 0x14bb4e310>]
ts_log_diff = ts_log - ts_log.shift()
plt.plot(ts_log_diff)
[<matplotlib.lines.Line2D at 0x14cbb9c10>]
ts_log_diff.dropna(inplace=True)
test_stationarity(ts_log_diff)
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic -1.110970e+01 p-value 3.686433e-20 #Lags Used 8.000000e+00 Number of Observations Used 5.300000e+02 Critical Value (5%) -2.867009e+00 Critical Value (1%) -3.442749e+00 Critical Value (10%) -2.569683e+00 dtype: float64
##log difference is stationary with 99% confidence
lag_acf = acf(ts_log_diff, nlags=20)
lag_pacf = pacf(ts_log_diff, nlags=20, method='ols')
plt.subplot(121)
plt.plot(lag_acf)
plt.axhline(y=0,linestyle='--',color='gray')
plt.axhline(y=-1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.axhline(y=1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.title('Autocorrelation Function')
<matplotlib.text.Text at 0x14f0d2290>
# p – The lag value where the PACF chart crosses the upper confidence interval
# for the first time.
# q – The lag value where the ACF chart crosses the upper confidence interval
# for the first time.
## p = 1, q = 1, d = 1
plt.subplot(122)
plt.plot(lag_pacf)
plt.axhline(y=0,linestyle='--',color='gray')
plt.axhline(y=-1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.axhline(y=1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.title('Partial Autocorrelation Function')
plt.tight_layout()
model = ARIMA(ts_log, order=(1, 1, 1))
results_ARIMA = model.fit(disp=-1)
plt.plot(ts_log_diff)
plt.plot(results_ARIMA.fittedvalues, color='red')
[<matplotlib.lines.Line2D at 0x14f573fd0>]
predictions_ARIMA_diff = pd.Series(results_ARIMA.fittedvalues, copy=True)
print predictions_ARIMA_diff.head()
yearmonth 1970-02-01 0.005805 1970-03-01 -0.372597 1970-04-01 -0.376705 1970-05-01 -0.320884 1970-06-01 0.154951 dtype: float64
predictions_ARIMA_diff_cumsum = predictions_ARIMA_diff.cumsum()
predictions_ARIMA_log = pd.Series(ts_log.ix[0], index=ts_log.index)
predictions_ARIMA_log = predictions_ARIMA_log.add(predictions_ARIMA_diff_cumsum,fill_value=0)
predictions_ARIMA_log.head()
yearmonth 1970-01-01 2.708050 1970-02-01 2.713855 1970-03-01 2.341258 1970-04-01 1.964553 1970-05-01 1.643669 dtype: float64
predictions_ARIMA = np.exp(predictions_ARIMA_log)
plt.plot(tsdf3["sum"])
plt.plot(predictions_ARIMA)
[<matplotlib.lines.Line2D at 0x14cd7f350>]
tsdf3["predict"] = predictions_ARIMA
tsdf3.loc["1994"]
| sum | change | SAD | SADchange | predict | |
|---|---|---|---|---|---|
| yearmonth | |||||
| 1994-01-01 | 125.0 | -93.0 | -6.0 | -121.0 | 20.654502 |
| 1994-02-01 | 99.0 | -26.0 | -19.0 | -13.0 | 27.145873 |
| 1994-03-01 | 140.0 | 41.0 | -5.0 | 14.0 | 39.474851 |
| 1994-04-01 | 107.0 | -33.0 | 4.0 | 9.0 | 39.660698 |
| 1994-05-01 | 98.0 | -9.0 | -56.0 | -60.0 | 49.109215 |
| 1994-06-01 | 100.0 | 2.0 | 0.0 | 56.0 | 61.336913 |
| 1994-07-01 | 83.0 | -17.0 | -50.0 | -50.0 | 70.998424 |
| 1994-08-01 | 89.0 | 6.0 | -21.0 | 29.0 | 91.165101 |
| 1994-09-01 | 83.0 | -6.0 | -22.0 | -1.0 | 103.608782 |
| 1994-10-01 | 72.0 | -11.0 | -97.0 | -75.0 | 120.214718 |
| 1994-11-01 | 55.0 | -17.0 | -197.0 | -100.0 | 149.517002 |
| 1994-12-01 | 102.0 | 47.0 | -116.0 | 81.0 | 215.020993 |
PART1 = tsdf3.loc["1970":"1992",:]
PART2 = tsdf3.loc["1994":"2015",:]
ts_log = np.log(PART1["sum"])
plt.plot(ts_log)
[<matplotlib.lines.Line2D at 0x14f8632d0>]
ts_log_diff = ts_log - ts_log.shift()
plt.plot(ts_log_diff)
[<matplotlib.lines.Line2D at 0x150247290>]
ts_log_diff.dropna(inplace=True)
test_stationarity(ts_log_diff)
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:5: FutureWarning: pd.rolling_mean is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).mean() /Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:6: FutureWarning: pd.rolling_std is deprecated for Series and will be removed in a future version, replace with Series.rolling(window=12,center=False).std()
Results of Dickey-Fuller Test: Test Statistic -8.859181e+00 p-value 1.499006e-14 #Lags Used 8.000000e+00 Number of Observations Used 2.660000e+02 Critical Value (5%) -2.872468e+00 Critical Value (1%) -3.455175e+00 Critical Value (10%) -2.572593e+00 dtype: float64
plt.subplot(121)
plt.plot(lag_acf)
plt.axhline(y=0,linestyle='--',color='gray')
plt.axhline(y=-1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.axhline(y=1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.title('Autocorrelation Function')
<matplotlib.text.Text at 0x151a51c50>
plt.subplot(122)
plt.plot(lag_pacf)
plt.axhline(y=0,linestyle='--',color='gray')
plt.axhline(y=-1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.axhline(y=1.96/np.sqrt(len(ts_log_diff)),linestyle='--',color='gray')
plt.title('Partial Autocorrelation Function')
plt.tight_layout()
model = ARIMA(ts_log, order=(1, 0, 0))
results_ARIMA = model.fit(disp=-1)
plt.plot(ts_log)
plt.plot(results_ARIMA.fittedvalues, color='red')
[<matplotlib.lines.Line2D at 0x15440ded0>]
predictions_ARIMA_diff = pd.Series(results_ARIMA.fittedvalues, copy=True)
#predictions_ARIMA_diff_cumsum = predictions_ARIMA_diff.cumsum()
#predictions_ARIMA_log = pd.Series(ts_log.ix[0], index=ts_log.index)
#predictions_ARIMA_log = predictions_ARIMA_log.add(predictions_ARIMA_diff_cumsum,fill_value=0)
predictions_ARIMA = np.exp(predictions_ARIMA_diff)
plt.plot(PART1["sum"])
plt.plot(predictions_ARIMA)
[<matplotlib.lines.Line2D at 0x1549b1290>]
PART1["predict"] = predictions_ARIMA
PART1.loc["1992"]
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:1: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy if __name__ == '__main__':
| sum | change | SAD | SADchange | predict | |
|---|---|---|---|---|---|
| yearmonth | |||||
| 1992-01-01 | 131.0 | 28.0 | -90.0 | -103.0 | 97.902083 |
| 1992-02-01 | 118.0 | -13.0 | -44.0 | 46.0 | 121.389400 |
| 1992-03-01 | 145.0 | 27.0 | 14.0 | 58.0 | 110.558459 |
| 1992-04-01 | 103.0 | -42.0 | -52.0 | -66.0 | 132.927146 |
| 1992-05-01 | 154.0 | 51.0 | -1.0 | 51.0 | 97.902083 |
| 1992-06-01 | 100.0 | -54.0 | -51.0 | -50.0 | 140.281505 |
| 1992-07-01 | 133.0 | 33.0 | -88.0 | -37.0 | 95.348180 |
| 1992-08-01 | 110.0 | -23.0 | -48.0 | 40.0 | 123.045336 |
| 1992-09-01 | 105.0 | -5.0 | -84.0 | -36.0 | 103.831060 |
| 1992-10-01 | 169.0 | 64.0 | -14.0 | 70.0 | 99.600305 |
| 1992-11-01 | 252.0 | 83.0 | 93.0 | 107.0 | 152.439382 |
| 1992-12-01 | 218.0 | -34.0 | 115.0 | 22.0 | 217.901243 |
PART1.loc["1992","sum"].sum()
1738.0
PART1.loc["1991","sum"].sum()
1988.0
PART1.loc["1992","predict"].sum()
1493.1261835456676
PART1.loc["1991","predict"].sum()
1782.5481332700003
results_ARIMA.summary()
| Dep. Variable: | sum | No. Observations: | 276 |
|---|---|---|---|
| Model: | ARMA(1, 0) | Log Likelihood | -137.728 |
| Method: | css-mle | S.D. of innovations | 0.397 |
| Date: | Thu, 11 May 2017 | AIC | 281.456 |
| Time: | 00:47:39 | BIC | 292.318 |
| Sample: | 01-01-1970 | HQIC | 285.815 |
| - 12-01-1992 |
| coef | std err | z | P>|z| | [0.025 | 0.975] | |
|---|---|---|---|---|---|---|
| const | 4.1548 | 0.220 | 18.924 | 0.000 | 3.724 | 4.585 |
| ar.L1.sum | 0.8942 | 0.027 | 32.834 | 0.000 | 0.841 | 0.948 |
| Real | Imaginary | Modulus | Frequency | |
|---|---|---|---|---|
| AR.1 | 1.1183 +0.0000j 1.1183 0.0000
fig, ax = plt.subplots(figsize=(10,8))
fig = results_ARIMA.plot_predict(start = "1990-01-01", end = "1995-12-01", ax = ax)
legend = ax.legend(loc='upper left')
rl = results_ARIMA.predict(start = "1990-01-01", end = "1995-12-01")
rls = pd.Series(rl, copy = True)
fillitin = np.exp(rls)
quiche = tsdf3.loc["1990":"1995",:]
fig, ax = plt.subplots(figsize=(10,8))
plt.plot(quiche["sum"])
plt.plot(fillitin)
legend = ax.legend(loc='upper left')
quiche.loc["1992"]["sum"].sum()
1738.0
impute = pd.DataFrame(fillitin, columns = ["prediction"])
impute.loc["1992"].prediction.sum()
1493.1261835456676
impute.loc["1993"].prediction.sum()
1495.2652135616154
impute.loc["1994"].prediction.sum()
906.0012048521072
quiche.loc["1994"]["sum"].sum()
1153.0
data[data.year == 1990].shape
(3887, 138)
data.groupby("attacktype1_txt").year.value_counts() ##877 assassinations in 1990, 3887 attacks
attacktype1_txt year
Armed Assault 2014 4087
2015 3353
2013 2959
2012 2081
2011 1391
1992 1327
1991 1271
1989 1120
2009 1118
2010 1114
2008 1093
1988 921
1990 876
1983 852
2007 848
1997 826
1984 823
1994 818
1987 798
1995 740
2006 737
1981 697
1982 665
1985 659
1996 638
1986 592
2001 581
1980 574
2005 510
2000 492
1979 447
1999 368
2002 366
2003 312
1998 264
2004 259
1977 255
1978 241
1976 124
1975 81
1972 63
1973 62
1970 61
1974 46
1971 44
Assassination 1992 1111
1989 980
2014 922
2015 917
1990 877
2013 845
1988 821
1994 771
1991 730
1995 729
1980 618
1979 526
1987 495
1996 478
2012 458
1984 443
1997 420
1981 405
1986 371
1982 362
1983 360
2010 360
2011 342
1985 311
1978 263
...
Unarmed Assault 2009 19
1998 15
2006 15
1991 14
2002 10
1979 7
1984 7
1989 7
1990 7
1986 6
2005 6
2007 6
1978 5
1985 5
1988 5
1974 4
1987 4
2004 4
1970 3
1973 3
1976 3
1981 3
1982 3
1980 2
1983 2
Unknown 2015 855
2014 782
1997 348
1996 291
2013 253
1995 232
1994 204
1979 196
1992 188
2012 182
1987 164
1984 157
2009 137
1985 134
1986 117
2010 116
2011 113
1983 110
2008 106
1980 98
1982 79
1981 74
1991 64
1978 52
2001 45
2000 43
1988 39
1999 39
2006 39
2005 38
2007 30
2003 27
2004 26
2002 25
1998 23
1989 17
1977 14
1990 13
1970 6
1976 5
1971 3
1975 3
1972 1
1973 1
1974 1
Name: year, dtype: int64
##Looking only at 1990
nineoh = data[data.year == 1990]
g = sns.factorplot(x="attacktype1_txt", col="region_txt",
data=nineoh, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([0, 1, 2, 3, 4, 5, 6, 7, 8]), <a list of 9 Text xticklabel objects>)
g = sns.factorplot(x="region_txt", col="attacktype1_txt",
data=nineoh, kind="count", col_wrap=4)
plt.xticks(rotation = 90)
(array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]), <a list of 11 Text xticklabel objects>)
bae = data[data.region_txt =="Sub-Saharan Africa"][data.year == 1990]
/Applications/anaconda/lib/python2.7/site-packages/ipykernel/__main__.py:1: UserWarning: Boolean Series key will be reindexed to match DataFrame index. if __name__ == '__main__':
pd.set_option('display.max_rows', 50)
bae
| eventid | year | month | day | approxdate | extended | resolution | country | country_txt | region | region_txt | provstate | city | latitude | longitude | specificity | vicinity | location | summary | crit1 | crit2 | crit3 | doubtterr | alternative | alternative_txt | multiple | success | suicide | attacktype1 | attacktype1_txt | attacktype2 | attacktype2_txt | attacktype3 | attacktype3_txt | targtype1 | targtype1_txt | targsubtype1 | targsubtype1_txt | corp1 | target1 | natlty1 | natlty1_txt | targtype2 | targtype2_txt | targsubtype2 | targsubtype2_txt | corp2 | target2 | natlty2 | natlty2_txt | targtype3 | targtype3_txt | targsubtype3 | targsubtype3_txt | corp3 | target3 | natlty3 | natlty3_txt | gname | gsubname | gname2 | gsubname2 | gname3 | ingroup | ingroup2 | ingroup3 | gsubname3 | motive | guncertain1 | guncertain2 | guncertain3 | nperps | nperpcap | claimed | claimmode | claimmode_txt | claim2 | claimmode2 | claimmode2_txt | claim3 | claimmode3 | claimmode3_txt | compclaim | weaptype1 | weaptype1_txt | weapsubtype1 | weapsubtype1_txt | weaptype2 | weaptype2_txt | weapsubtype2 | weapsubtype2_txt | weaptype3 | weaptype3_txt | weapsubtype3 | weapsubtype3_txt | weaptype4 | weaptype4_txt | weapsubtype4 | weapsubtype4_txt | weapdetail | nkill | nkillus | nkillter | nwound | nwoundus | nwoundte | property | propextent | propextent_txt | propvalue | propcomment | ishostkid | nhostkid | nhostkidus | nhours | ndays | divert | kidhijcountry | ransom | ransomamt | ransomamtus | ransompaid | ransompaidus | ransomnote | hostkidoutcome | hostkidoutcome_txt | nreleased | addnotes | scite1 | scite2 | scite3 | dbsource | INT_LOG | INT_IDEO | INT_MISC | INT_ANY | related | is_bombing | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 41070 | 199001090001 | 1990 | 1 | 9 | 1990-01-09 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 3 | Police | 22.0 | Police Building (headquarters, station, school) | Police | Criminal Investigation Dept. Building | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 3.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 41079 | 199001100002 | 1990 | 1 | 10 | 1990-01-10 | 0 | NaN | 213 | Uganda | 11 | Sub-Saharan Africa | Unknown | Omogolo | NaN | NaN | 5 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 14 | Private Citizens & Property | 75.0 | Village/City/Town/Suburb | Govt | Omogolo Village | 213.0 | Uganda | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Uganda People's Army | NaN | NaN | NaN | NaN | 1997 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | 8.0 | Incendiary | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm; Incendiary | 9.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 41108 | 199001130001 | 1990 | 1 | 13 | 1990-01-13 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Sofala | Beira | -19.833307 | 34.849994 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | Lonrho | oil pipeline | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 1 | 1 | 1 | NaN | 1 |
| 41109 | 199001130002 | 1990 | 1 | 13 | 1990-01-13 | 0 | NaN | 231 | Zimbabwe | 11 | Sub-Saharan Africa | Unknown | Unknown | NaN | NaN | 5 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | Lonrho Corporation | Beira Corridor Pipeline | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 95000.0 | Damages: exlposion, damaged oil pipeline, lost... | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 1 | 1 | 1 | 1 | NaN | 1 |
| 41126 | 199001150001 | 1990 | 1 | 15 | 1990-01-15 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Cuanza Sul | Gabela | -10.847674 | 14.366217 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 14 | Private Citizens & Property | 76.0 | House/Apartment/Residence | NaN | Abandoned house | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 41134 | 199001160001 | 1990 | 1 | 16 | 1990-01-16 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Sofala | Beira | -19.833307 | 34.849994 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | Lonrho | oil Pipeline | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 1 | 1 | 1 | NaN | 1 |
| 41135 | 199001160002 | 1990 | 1 | 16 | 1990-01-16 | 0 | NaN | 231 | Zimbabwe | 11 | Sub-Saharan Africa | Midlands | Bera | -20.064020 | 30.158850 | 2 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | Lonrho Corporation | Beira Corridor Pipeline | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 70888.0 | Damages: explosion, damaged oil pipeline, lost... | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 1 | 1 | 1 | 1 | NaN | 1 |
| 41136 | 199001160003 | 1990 | 1 | 16 | 1990-01-16 | 0 | NaN | 231 | Zimbabwe | 11 | Sub-Saharan Africa | Unknown | Unknown | NaN | NaN | 5 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | Lonrho Corporation | Beira Corridor Pipeline | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 149500.0 | Damages: explosion, damaged oil pipeline, lost... | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 1 | 1 | 1 | 1 | NaN | 1 |
| 41157 | 199001180002 | 1990 | 1 | 18 | 1990-01-18 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Inhambane | Mapinhame | -22.253672 | 35.111042 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 14 | Private Citizens & Property | 75.0 | Village/City/Town/Suburb | govt | Village of Mapinhame | 137.0 | Mozambique | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 19.0 | NaN | NaN | 17.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 1.0 | 50.0 | 0.0 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 41229 | 199001260001 | 1990 | 1 | 26 | 1990-01-26 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Moxico | Luena | -11.792588 | 19.906596 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 14 | Private Citizens & Property | 79.0 | Public Area (garden, parking lot, garage, beac... | NaN | Residential Street | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 41230 | 199001260002 | 1990 | 1 | 26 | 1990-01-26 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Moxico | Luena | -11.792588 | 19.906596 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 2 | Government (General) | 21.0 | Government Building/Facility/Office | Govt | Post Office | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 41231 | 199001260003 | 1990 | 1 | 26 | 1990-01-26 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Moxico | Luena | -11.792588 | 19.906596 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 0 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 14 | Private Citizens & Property | 79.0 | Public Area (garden, parking lot, garage, beac... | Govt | Main city street | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 41257 | 199001290009 | 1990 | 1 | 29 | 1990-01-29 | 0 | NaN | 213 | Uganda | 11 | Sub-Saharan Africa | Northern | Pajule | 2.953732 | 32.935315 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 1 | Assassination | NaN | . | NaN | . | 15 | Religious Figures/Institutions | 85.0 | Religious Figure | Catholic Church Missionaries | Egidio Biscaro * | 98.0 | Italy | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 1.0 | NaN | NaN | 1.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 1 | 1 | NaN | 0 |
| 41272 | 199001300013 | 1990 | 1 | 30 | 1990-01-30 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | KwaZulu-Natal | KwaMashu | -29.750860 | 30.983353 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 1 | Assassination | NaN | . | NaN | . | 3 | Police | 25.0 | Police Security Forces/Officers | Police | Policeman | 183.0 | South Africa | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | 1.0 | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 3.0 | Handgun | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Pistol | 1.0 | NaN | NaN | 0.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 0 |
| 41273 | 199001300014 | 1990 | 1 | 30 | 1990-01-30 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | KwaZulu-Natal | Inanda | -29.684008 | 30.932428 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 1 | Assassination | NaN | . | NaN | . | 14 | Private Citizens & Property | 67.0 | Unnamed Civilian/Unspecified | NaN | 2 Persons | 183.0 | South Africa | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 9 | Melee | 23.0 | Knife or Other Sharp Object | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Knife | 2.0 | NaN | NaN | 1.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 0 |
| 41274 | 199001300015 | 1990 | 1 | 30 | 1990-01-30 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | KwaZulu-Natal | KwaDabeka | -29.767645 | 30.913095 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 0 | 0 | 1 | Assassination | NaN | . | NaN | . | 3 | Police | 25.0 | Police Security Forces/Officers | Police | Policeman | 183.0 | South Africa | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 4.0 | Rifle/Shotgun (non-automatic) | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Shotgun | 0.0 | NaN | NaN | 1.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 0 |
| 41286 | 199002020002 | 1990 | 2 | 2 | 1990-02-02 | 1 | 2/22/90 | 195 | Sudan | 11 | Sub-Saharan Africa | Upper Nile | Malakal | 9.544530 | 31.654018 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 6 | Hostage Taking (Kidnapping) | NaN | . | NaN | . | 12 | NGO | 62.0 | International NGO | Doctors without Borders (European relief agency) | Doctor Christine van Haegenborh | 21.0 | Belgium | 12.0 | NGO | 62.0 | International NGO | Doctors without Borders (European relief agency) | Doctor Martin Ruppert | 142.0 | Netherlands | NaN | . | NaN | . | NaN | NaN | NaN | . | Sudan People's Liberation Army (SPLA) | NaN | NaN | NaN | NaN | 611 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 4.0 | Rifle/Shotgun (non-automatic) | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Rifles | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 1.0 | 2.0 | 0.0 | 0.0 | 20.0 | NaN | Sudan | 0.0 | NaN | NaN | NaN | NaN | NaN | 2.0 | Hostage(s) released by perpetrators | 2.0 | NaN | NaN | NaN | NaN | PGIS | 1 | 1 | 1 | 1 | NaN | 0 |
| 41307 | 199002040009 | 1990 | 2 | 4 | 1990-02-04 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Sofala | Unknown | -19.233887 | 34.861416 | 4 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 2 | Government (General) | 21.0 | Government Building/Facility/Office | Govt Relief Agency | truck | 137.0 | Mozambique | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 12.0 | NaN | NaN | 18.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 41308 | 199002040010 | 1990 | 2 | 4 | 1990-02-04 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | Gauteng | Pretoria | -25.746096 | 28.186455 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 7 | Facility/Infrastructure Attack | NaN | . | NaN | . | 7 | Government (Diplomatic) | 46.0 | Embassy/Consulate | U.K. State Department | U.K. Embassy | 216.0 | Great Britain | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Right-Wing Extremists | NaN | NaN | NaN | NaN | 585 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 4.0 | Rifle/Shotgun (non-automatic) | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Shotgun | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 1 | 1 | NaN | 0 |
| 41359 | 199002100014 | 1990 | 2 | 10 | 1990-02-10 | 1 | 2/10/90 | 137 | Mozambique | 11 | Sub-Saharan Africa | Gaza | Unknown | -23.024331 | 32.717802 | 4 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 6 | Hostage Taking (Kidnapping) | NaN | . | NaN | . | 14 | Private Citizens & Property | 67.0 | Unnamed Civilian/Unspecified | NaN | 17 Villagers | 137.0 | Mozambique | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 13 | Unknown | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | 17.0 | NaN | NaN | 0.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 1.0 | 17.0 | 0.0 | 0.0 | 1.0 | NaN | Mozambique | 0.0 | NaN | NaN | NaN | NaN | NaN | 4.0 | Hostage(s) killed (not during rescue attempt) | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 41366 | 199002120001 | 1990 | 2 | 12 | 1990-02-12 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Cacuaco | -8.776715 | 13.371194 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 9 | Food or Water Supply | 52.0 | Water Supply | Public Water Co. (EPAEL) | Quifangondo Water Pipeline | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 41367 | 199002120002 | 1990 | 2 | 12 | 1990-02-12 | 0 | NaN | 65 | Ethiopia | 11 | Sub-Saharan Africa | Central | Hazhaz | 15.355625 | 38.935461 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | Electrical Power Company | line | 65.0 | Ethiopia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Eritrean Peoples Liberation Front | NaN | NaN | NaN | NaN | 2061 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 41368 | 199002120003 | 1990 | 2 | 12 | 1990-02-12 | 0 | NaN | 65 | Ethiopia | 11 | Sub-Saharan Africa | Central | Hazhaz | 15.355625 | 38.935461 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 3 | Police | 22.0 | Police Building (headquarters, station, school) | Police | Patrol Station | 65.0 | Ethiopia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Eritrean Peoples Liberation Front | NaN | NaN | NaN | NaN | 2061 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 41369 | 199002120004 | 1990 | 2 | 12 | 1990-02-12 | 0 | NaN | 65 | Ethiopia | 11 | Sub-Saharan Africa | Central | Asmera | 15.333513 | 38.933652 | 1 | 0 | NaN | NaN | 1 | 1 | 0 | 1.0 | 1.0 | Insurgency/Guerilla Action | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 4 | Military | 28.0 | Military Recruiting Station/Academy | Military | Naval College | 65.0 | Ethiopia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 41370 | 199002120005 | 1990 | 2 | 12 | 1990-02-12 | 0 | NaN | 65 | Ethiopia | 11 | Sub-Saharan Africa | Central | Asmera | 15.333513 | 38.933652 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 6 | Airports & Aircraft | 44.0 | Airport | NaN | Airport | 65.0 | Ethiopia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 44557 | 199011200003 | 1990 | 11 | 20 | 1990-11-20 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Unknown | Unknown | NaN | NaN | 5 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 1 | Business | 5.0 | Industrial/Textiles/Factory | Electrical Corp | electrical power line repair crew | 137.0 | Mozambique | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 5.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 44579 | 199011230002 | 1990 | 11 | 23 | 1990-11-23 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | KwaZulu-Natal | Harding | -30.579448 | 29.885266 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 19 | Transportation | 99.0 | Bus (excluding tourists) | NaN | van and mini-bus | 183.0 | South Africa | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 9.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 30000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 0 |
| 44638 | 199011290001 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Panguila | -8.715953 | 13.438900 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 19 | Transportation | 103.0 | Bridge/Car Tunnel | Govt | Bridge on road Luana to Bengo Province | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 44639 | 199011290002 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290003, 199011290004, 199011290005, 1990... | 1 |
| 44640 | 199011290003 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290004, 199011290005, 1990... | 1 |
| 44641 | 199011290004 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290005, 1990... | 1 |
| 44642 | 199011290005 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44643 | 199011290006 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44644 | 199011290007 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44645 | 199011290008 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44646 | 199011290009 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44647 | 199011290010 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44648 | 199011290011 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 1 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | NaN | High tension line Tower, bring power to Luanda... | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | 199011290002, 199011290003, 199011290004, 1990... | 1 |
| 44657 | 199011290020 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Malanje | Cabria | -9.396975 | 16.450004 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 3 | Police | 25.0 | Police Security Forces/Officers | Police | Unit | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 2.0 | NaN | 0.0 | 0.0 | NaN | 0.0 | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 44658 | 199011290021 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Kifangondo | -8.765023 | 13.433716 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 14 | Private Citizens & Property | 75.0 | Village/City/Town/Suburb | govt | Village of Kifangondo | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 1.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 44659 | 199011290022 | 1990 | 11 | 29 | 1990-11-29 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 1 | Business | 4.0 | Multinational Corporation | Angola Petroleum | Oil Refinery (Butane Gas Treatment Plant) | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 11.0 | Projectile (rockets, mortars, RPGs, etc.) | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Mortar | 1.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 44661 | 199011300001 | 1990 | 11 | 30 | 1990-11-30 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Zaire | Soyo | -6.133550 | 12.366833 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 108.0 | Oil | NaN | oil pipeline | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 44725 | 199012070001 | 1990 | 12 | 7 | 1990-12-07 | 0 | NaN | 137 | Mozambique | 11 | Sub-Saharan Africa | Unknown | Unknown | NaN | NaN | 5 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 21 | Utilities | 107.0 | Electricity | Electrical Power Co. | High tension line tower | 137.0 | Mozambique | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Mozambique National Resistance Movement (MNR) | NaN | NaN | NaN | NaN | 490 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive - defused | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | 3.0 | Minor (likely < $1 million) | 50000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 44811 | 199012160001 | 1990 | 12 | 16 | 1990-12-16 | 0 | NaN | 182 | Somalia | 11 | Sub-Saharan Africa | Banaadir | Mogadishu | 2.037420 | 45.337971 | 1 | 1 | NaN | NaN | 1 | 1 | 0 | 1.0 | 1.0 | Insurgency/Guerilla Action | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 4 | Military | 31.0 | Military Aircraft | Military | Three Air Force aircraft | 182.0 | Somalia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | United Somali Congress | NaN | NaN | NaN | NaN | 1539 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
| 44828 | 199012170007 | 1990 | 12 | 17 | 1990-12-17 | 0 | NaN | 213 | Uganda | 11 | Sub-Saharan Africa | Northern | Kitgum District | 3.288485 | 32.878950 | 3 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 6 | Hostage Taking (Kidnapping) | NaN | . | NaN | . | 10 | Journalists & Media | 55.0 | Television Journalist/Staff/Facility | NaN | Italian TV Cameraman (Giorgio Salomon age 44 f... | 98.0 | Italy | 10.0 | Journalists & Media | NaN | . | NaN | 2 Uganda Associates | 213.0 | Uganda | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | 50.0 | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 0 | NaN | . | NaN | NaN | 1.0 | 3.0 | 0.0 | NaN | NaN | NaN | Uganda | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 1 | 1 | NaN | 0 |
| 44832 | 199012190001 | 1990 | 12 | 19 | 1990-12-19 | 0 | NaN | 183 | South Africa | 11 | Sub-Saharan Africa | Gauteng | Johannesburg | -26.177929 | 27.974858 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 0 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 22 | Violent Political Party | 110.0 | Party Office/Facility | African National Congress (ANC) | Headquarters | 183.0 | South Africa | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 1 |
| 44839 | 199012200002 | 1990 | 12 | 20 | 1990-12-20 | 0 | NaN | 182 | Somalia | 11 | Sub-Saharan Africa | Banaadir | Mogadishu | 2.037420 | 45.337971 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | -9.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 6 | Airports & Aircraft | 44.0 | Airport | NaN | International Airport | 182.0 | Somalia | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Unknown | NaN | NaN | NaN | NaN | -9 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 1.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | -9 | -9 | 0 | -9 | NaN | 0 |
| 44849 | 199012220001 | 1990 | 12 | 22 | 1990-12-22 | 0 | NaN | 174 | Senegal | 11 | Sub-Saharan Africa | Ziguinchor | Ziguinchor | 12.583333 | -16.266667 | 1 | 1 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 2 | Government (General) | 21.0 | Government Building/Facility/Office | Govt | Agrilcultural Research Center | 174.0 | Senegal | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | Movement of Democratic Forces of Casamance | NaN | NaN | NaN | NaN | 486 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 0.0 | NaN | NaN | 1.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 44860 | 199012250001 | 1990 | 12 | 25 | 1990-12-25 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Bie | Munhango | -12.155532 | 18.555721 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 2 | Armed Assault | NaN | . | NaN | . | 14 | Private Citizens & Property | 75.0 | Village/City/Town/Suburb | Govt | town of Munhango | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 5 | Firearms | 2.0 | Automatic Weapon | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Automatic firearm | 0.0 | NaN | NaN | 0.0 | NaN | NaN | 1 | NaN | . | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 0 |
| 44873 | 199012280001 | 1990 | 12 | 28 | 1990-12-28 | 0 | NaN | 8 | Angola | 11 | Sub-Saharan Africa | Luanda | Luanda | -8.838837 | 13.235582 | 1 | 0 | NaN | NaN | 1 | 1 | 1 | 0.0 | NaN | . | 0 | 1 | 0 | 3 | Bombing/Explosion | NaN | . | NaN | . | 6 | Airports & Aircraft | 44.0 | Airport | NaN | Luanda International Airport | 8.0 | Angola | NaN | . | NaN | . | NaN | NaN | NaN | . | NaN | . | NaN | . | NaN | NaN | NaN | . | National Union for the Total Independence of A... | NaN | NaN | NaN | NaN | 499 | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | . | NaN | NaN | . | NaN | 6 | Explosives/Bombs/Dynamite | 16.0 | Unknown Explosive Type | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | NaN | . | Explosive | 0.0 | NaN | NaN | 2.0 | NaN | NaN | 1 | 2.0 | Major (likely > $1 million but < $1 billion) | 1000000.0 | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | 0.0 | NaN | NaN | NaN | NaN | NaN | NaN | . | NaN | NaN | NaN | NaN | NaN | PGIS | 0 | 0 | 0 | 0 | NaN | 1 |
450 rows × 138 columns
bae2 = bae[bae.country_txt != "South Africa"]
bae2 = bae2[bae2.country_txt != "Uganda"]
bae.country_txt.value_counts()
Angola 205 South Africa 154 Mozambique 23 Uganda 14 Somalia 12 Senegal 11 Ethiopia 10 Zimbabwe 6 Zambia 4 Liberia 4 Namibia 2 Botswana 1 Djibouti 1 Republic of the Congo 1 Mali 1 Sudan 1 Name: country_txt, dtype: int64
bae2.country_txt.value_counts()
Angola 205 Mozambique 23 Somalia 12 Senegal 11 Ethiopia 10 Zimbabwe 6 Zambia 4 Liberia 4 Namibia 2 Botswana 1 Mali 1 Djibouti 1 Republic of the Congo 1 Sudan 1 Name: country_txt, dtype: int64
SA = bae[bae.country_txt == "South Africa"]
SA.attacktype1_txt.value_counts()
Bombing/Explosion 67 Armed Assault 34 Assassination 31 Facility/Infrastructure Attack 21 Hostage Taking (Kidnapping) 1 Name: attacktype1_txt, dtype: int64
sa = bae[bae.country_txt == "South Africa"].nwound.values
ug = bae[bae.country_txt == "Uganda"].nwound.values
mean_prior_mean = bae2.nwound.mean()
mean_prior_std = bae2.nwound.std()
# model specifications in PyMC3 are wrapped in a with-statement
with pm.Model() as model:
groupSA_mean = pm.Normal('Wounded_SA_mean', mean_prior_mean, sd=mean_prior_std)
groupUG_mean = pm.Normal('Wounded_UG_mean', mean_prior_mean, sd=mean_prior_std)
std_prior_lower = 0.01
std_prior_upper = 100.0
with model:
groupSA_std = pm.Uniform('Wounded_SA_std', lower=std_prior_lower, upper=std_prior_upper)
groupUG_std = pm.Uniform('Wounded_UG_std', lower=std_prior_lower, upper=std_prior_upper)
with model:
groupSA = pm.Normal('Wounded_SA', mu=groupSA_mean, sd=groupSA_std, observed=sa)
groupUG = pm.Normal('Wounded_UG', mu=groupUG_mean, sd=groupUG_std, observed=ug)
with model:
diff_of_means = pm.Deterministic('difference of means', groupSA_mean - groupUG_mean)
diff_of_stds = pm.Deterministic('difference of stds', groupSA_std - groupUG_std)
effect_size = pm.Deterministic('effect size',
diff_of_means / np.sqrt((groupSA_std**2 + groupUG_std**2) / 2))
with model:
trace = pm.sample(25000, njobs=-1)
Auto-assigning NUTS sampler... Initializing NUTS using advi... Average ELBO = -614.48: 100%|██████████| 200000/200000 [00:30<00:00, 6465.19it/s] Finished [100%]: Average ELBO = -614.48 100%|██████████| 25000/25000 [00:40<00:00, 612.57it/s]
pm.plot_posterior(trace[3000:],
varnames=['Wounded_SA_mean', 'Wounded_UG_mean', 'Wounded_SA_std', 'Wounded_UG_std'],
color='#87ceeb')
array([<matplotlib.axes._subplots.AxesSubplot object at 0x169df7290>,
<matplotlib.axes._subplots.AxesSubplot object at 0x169df7b50>,
<matplotlib.axes._subplots.AxesSubplot object at 0x16960c790>,
<matplotlib.axes._subplots.AxesSubplot object at 0x169443810>], dtype=object)
pm.plot_posterior(trace[3000:],
varnames=['difference of means', 'difference of stds', 'effect size'],
ref_val=0,
color='#87ceeb')
array([<matplotlib.axes._subplots.AxesSubplot object at 0x1644d6c10>,
<matplotlib.axes._subplots.AxesSubplot object at 0x1663c77d0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x16651c6d0>], dtype=object)
pm.summary(trace[3000:],
varnames=['difference of means', 'difference of stds', 'effect size'])
difference of means: Mean SD MC Error 95% HPD interval ------------------------------------------------------------------- -0.313 1.767 0.013 [-3.717, 3.250] Posterior quantiles: 2.5 25 50 75 97.5 |--------------|==============|==============|--------------| -3.815 -1.463 -0.319 0.828 3.173 difference of stds: Mean SD MC Error 95% HPD interval ------------------------------------------------------------------- 3.192 1.435 0.012 [0.222, 5.681] Posterior quantiles: 2.5 25 50 75 97.5 |--------------|==============|==============|--------------| -0.129 2.412 3.364 4.180 5.507 effect size: Mean SD MC Error 95% HPD interval ------------------------------------------------------------------- -0.040 0.222 0.002 [-0.476, 0.396] Posterior quantiles: 2.5 25 50 75 97.5 |--------------|==============|==============|--------------| -0.479 -0.188 -0.041 0.106 0.395
##When looking at casualty rates due to terror attacks in Sub-Saharan Africa for the year 1990,
##South Africa does not differ significantly from Uganda -- only the spread of the data differs significantly